ZCMP(1)
π ZCMP(1) β the zcmp manual, bestie edition
okay so picture this: it's a User Commands situation, the program is called zcmp, and she is literally about to become your new favorite little comparison icon. let's get into it π
β¨ NAME β¨
zcmp β decompress and compare two files byte by byte π¦
πΈ SYNOPSIS πΈ
zcmp [options] file1 [file2]
that's it. that's the whole vibe check. two files, one destiny β¨
π DESCRIPTION π
okay so here's the tea, bestie: zcmp compares two files, and if they differ it 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. and here's the slay part β if any file given is compressed, its decompressed content is used. compressed files are decompressed on the fly; no temporary files are created. no cap, zero crumbs left behind π§
the formats supported are bzip2, gzip, lzip, xz, and zstd. she's versatile, she contains multitudes π
so zcmp compares file1 to file2. the standard input is used only if file1 or file2 refers to standard input. and if file2 is omitted, zcmp tries to compare file1 with the corresponding uncompressed file (if file1 is compressed), and then with the corresponding compressed files of the remaining formats until one is found. she will hunt for her match, periodt π₯
exit status is 0 if inputs are identical, 1 if different, 2 if trouble. memorize that, it's giving main character energy π
π OPTIONS π
-h,--helpβ display this help and exit π«Ά-V,--versionβ output version information and exit β¨-b,--print-bytesβ print differing bytes π-H,--hexadecimalβ print hexadecimal values instead of octal π’-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 one or both input formats πͺ-q,--quiet,--silentβ suppress diagnostics written to stderr π€«-s,--scriptβ suppress messages about file differences π¬-v,--verboseβ verbose mode (opposite of--quiet) π£οΈ--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 β‘
valid formats for options -M and -O are bz2, gz, lz, xz, zst, and un for uncompressed. (un = uncompressed, iykyk π«Ά)
π’ about those byte counts, bestie π’
byte counts given as arguments to options may be expressed in decimal, hexadecimal, or octal (using the same syntax as integer constants in C++), and may be followed by a multiplier:
k=kB= 10^3 = 1000Ki=KiB= 2^10 = 1024M= 10^6Mi= 2^20G= 10^9Gi= 2^30- etc. π
π REPORTING BUGS π
found a bug? don't suffer in silence, bestie β report bugs to zutils-bug@nongnu.org π
Zutils home page: http://www.nongnu.org/zutils/zutils.html π
β COPYRIGHT β
Copyright Β© 2025 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. (yes, all caps NO WARRANTY β she's serious about that one π)
π SEE ALSO π
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. go read it, it's iconic π
and that's the whole page, bestie π«Ά go forth and compare bytes, you absolute legend π β¨
this has been zutils 1.15, dated May 2025 β mwah, catch you in the next manpage ππ
π¦ where this page comes from
- alpine 3.24: zutils-doc 1.15-r0 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms