xzdiff - Man Page
compare compressed files
Examples (TL;DR)
- Compare two files:
xzdiff path/to/file1 path/to/file2
- Compare two files, showing the differences side by side:
xzdiff --side-by-side path/to/file1 path/to/file2
- Compare two files and report only that they differ (no details on what is different):
xzdiff --brief path/to/file1 path/to/file2
- Compare two files and report when the files are the same:
xzdiff --report-identical-files path/to/file1 path/to/file2
- Compare two files using paginated results:
xzdiff --paginate path/to/file1 path/to/file2
Synopsis
xzcmp [option...] file1 [file2]
xzdiff ...
lzcmp ...
lzdiff ...
Description
xzcmp and xzdiff compare uncompressed contents of two files. Uncompressed data and options are passed to cmp(1) or diff(1) unless --help or --version is specified.
If both file1 and file2 are specified, they can be uncompressed files or files in formats that xz(1), gzip(1), bzip2(1), lzop(1), zstd(1), or lz4(1) can decompress. The required decompression commands are determined from the filename suffixes of file1 and file2. A file with an unknown suffix is assumed to be either uncompressed or in a format that xz(1) can decompress.
If only one filename is provided, file1 must have a suffix of a supported compression format and the name for file2 is assumed to be file1 with the compression format suffix removed.
The commands lzcmp and lzdiff are provided for backward compatibility with LZMA Utils.
Exit Status
If a decompression error occurs, the exit status is 2. Otherwise the exit status of cmp(1) or diff(1) is used.
See Also
cmp(1), diff(1), xz(1), gzip(1), bzip2(1), lzop(1), zstd(1), lz4(1)
Referenced By
The man pages lzcmp(1), lzdiff(1) and xzcmp(1) are aliases of xzdiff(1).