← 返回命令列表

Linux command

lzcmp 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Compare two compressed files

lzcmp [file1.xz] [file2.xz]

Compare with verbose output

lzcmp -l [file1.xz] [file2.xz]

Compare silently

lzcmp -s [file1.gz] [file2.gz]

Compare compressed file with its uncompressed original

lzcmp [file.xz]

说明

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.

参数

-l
Print byte number and differing byte values.
-s
Silent mode, output nothing, return exit status only.

FAQ

What is the lzcmp command used for?

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.

How do I run a basic lzcmp example?

Run `lzcmp [file1.xz] [file2.xz]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -l do in lzcmp?

Print byte number and differing byte values.