GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
ZCMP(1) User Commands ZCMP(1)

zcmp - decompress and compare two files byte by byte

zcmp [options] file1 [file2]

zcmp compares two files and, if they differ, writes to standard output the first byte and line number where they differ. Bytes and lines are numbered starting with 1. A hyphen '-' used as a file argument means standard input. If any file given is compressed, its decompressed content is used. Compressed files are decompressed on the fly; no temporary files are created.

The formats supported are bzip2, gzip, lzip, xz, and zstd.

zcmp compares file1 to file2. The standard input is used only if file1 or file2 refers to standard input. If file2 is omitted zcmp tries the following:

- If file1 is compressed, compares its decompressed contents with the corresponding uncompressed file (the name of file1 with the extension removed).
- If file1 is uncompressed, compares it with the decompressed contents of file1.[lz|bz2|gz|zst|xz] (the first one that is found).

Exit status is 0 if inputs are identical, 1 if different, 2 if trouble.

-h, --help
display this help and exit
-V, --version
output version information and exit
-b, --print-bytes
print differing bytes
-i, --ignore-initial=<n>[:<n2>]
ignore differences in the first <n> bytes
-l, --list
list position, value of all differing bytes
-M, --format=<list>
process only the formats in <list>
-n, --bytes=<n>
compare at most <n> bytes
-N, --no-rcfile
don't read runtime configuration file
-O, --force-format=[<f1>][,<f2>]
force the formats given (bz2,gz,lz,xz,zst)
-q, --quiet
suppress all messages
-s, --silent
(same as --quiet)
-v, --verbose
verbose mode (same as --list)
--bz2=<command>
set compressor and options for bzip2 format
--gz=<command>
set compressor and options for gzip format
--lz=<command>
set compressor and options for lzip format
--xz=<command>
set compressor and options for xz format
--zst=<command>
set compressor and options for zstd format

Numbers may be followed by a multiplier: k = kB = 10^3 = 1000, Ki = KiB = 2^10 = 1024, M = 10^6, Mi = 2^20, G = 10^9, Gi = 2^30, etc...

Report bugs to zutils-bug@nongnu.org
Zutils home page: http://www.nongnu.org/zutils/zutils.html

Copyright © 2022 Antonio Diaz Diaz. License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

The full documentation for zcmp is maintained as a Texinfo manual. If the info and zcmp programs are properly installed at your site, the command
info zutils

should give you access to the complete manual.

January 2022 zutils 1.11

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.