XZDIFF(1)

๐Ÿ“ฆ
version 5.8.4 ยท 5 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

๐ŸŽ€ XZDIFF(1) โ€” XZ Utils ๐ŸŽ€

okay bestie, this is XZDIFF(1) from XZ Utils ๐Ÿ’– and its whole thing is comparing files that are already compressed, so you never have to unzip them first ๐Ÿ˜ญโœจ the commands in this page are xzcmp, xzdiff, lzcmp, and lzdiff, and they all do the same comparison job ๐Ÿ’…

๐ŸŽ€ NAME ๐ŸŽ€

xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files ๐Ÿฆ‹

โœจ SYNOPSIS โœจ

xzcmp [option...]  file1 [file2]
xzdiff ...
lzcmp ...  (DEPRECATED)
lzdiff ...  (DEPRECATED)

๐ŸŒธ DESCRIPTION ๐ŸŒธ

okay so xzcmp and xzdiff are the dynamic duo here ๐Ÿ‘‘ they compare the uncompressed contents of two files. the uncompressed data and your options get handed off to cmp(1) or diff(1), unless you ask for --help or --version, in which case they just show you that info instead ๐Ÿซถ

if you give both file1 and file2, they can be plain uncompressed files, or files in any format that xz(1), gzip(1), bzip2(1), lzop(1), zstd(1), or lz4(1) can decompress ๐Ÿ”ฅ the right decompression command gets picked from the filename suffixes of file1 and file2. a file with a suffix it doesn't recognize is assumed to be either uncompressed or something xz(1) can decompress. no cap, it's very chill ๐ŸŒˆ

if you only give one filename, then file1 has to end in a suffix for a supported compression format ๐Ÿ’€ and file2 is assumed to be file1 with that compression suffix chopped off. so file1.xz would pair with plain file1 ๐Ÿ“

the commands lzcmp and lzdiff are only around for backward compatibility with LZMA Utils ๐Ÿ™ˆ they are deprecated and will be removed in a future version, so maybe don't build your whole life around them bestie ๐Ÿ˜ญ

๐Ÿšช EXIT STATUS ๐Ÿšช

if a decompression error happens, the exit status is 2 ๐Ÿ’€ otherwise you get whatever exit status cmp(1) or diff(1) gave back โœจ

๐Ÿ”— SEE ALSO ๐Ÿ”—

cmp(1), diff(1), xz(1), gzip(1), bzip2(1), lzop(1), zstd(1), lz4(1) ๐Ÿ’œ


that's the whole page, bestie ๐Ÿซถ from Tukaani, dated 2025-03-06, filed under XZDIFF(1) ๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from