LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

lzcmp

compare compressed files byte by byte

TLDR

Compare two compressed files
$ lzcmp [file1.xz] [file2.xz]
copy
Compare with verbose output
$ lzcmp -l [file1.xz] [file2.xz]
copy
Compare silently
$ lzcmp -s [file1.gz] [file2.gz]
copy
Compare compressed file with its uncompressed original
$ lzcmp [file.xz]
copy

SYNOPSIS

lzcmp [cmpoptions] file1 [file2_]

DESCRIPTION

lzcmp invokes cmp(1) on compressed files. It supports files compressed with xz, lzma, gzip, bzip2, lzop, zstd, and lz4. If only one file is specified, it is compared against a file with the compression suffix stripped. If two files are specified, both are decompressed as needed and fed to cmp. The exit status from cmp is preserved: 0 if identical, 1 if different, 2 on error.The name lzcmp is provided for backward compatibility with LZMA Utils. It is deprecated in favor of xzcmp and will be removed in a future version of XZ Utils.

PARAMETERS

-l

Print byte number and differing byte values.
-s
Silent mode, output nothing, return exit status only.
All options are passed directly to cmp(1).

SEE ALSO

cmp(1), lzdiff(1), xzcmp(1), xzdiff(1), zcmp(1), xz(1)

Copied to clipboard
Kai