ZDIFF(1)
๐ NAME ๐
okay so zcmp and zdiff are the bestie duo for comparing compressed files ๐ they're basically compare compressed files but make it iconic โจ
๐ธ SYNOPSIS ๐ธ
zcmp [ cmp_options ] file1 [ file2 ]
zdiff [ diff_options ] file1 [ file2 ]
โจ DESCRIPTION โจ
okay this is the tea ๐ซ zcmp and zdiff literally just call cmp or diff for you, but on files that were squished with gzip ๐๏ธ๐
every option you type gets passed straight through to cmp or diff, no cap.
if you only give it file1, it gets compared to the uncompressed version of file1.gz ๐ฆ if you give it two files, both get unzipped first (only if they need it, bc we're efficient like that ๐) and then fed into cmp or diff.
the input files stay exactly as they were, no modifications, zero drama ๐ซถ and the exit status from cmp or diff gets preserved too, so your scripts still know what's up ๐
๐ SEE ALSO ๐
these are your besties for the rest of the vibes: cmp(1), diff(1), zmore(1), zgrep(1), znew(1), zforce(1), gzip(1), and gzexe(1) ๐ง
๐ BUGS ๐
โ ๏ธ ngl this one is a little messy: messages fromcmpordiffmight refer to file names like"-"instead of the actual file names you typed ๐ so if the output looks confusing, that's why!
ZDIFF(1) ๐ bestie, you just leveled up your Unix game ๐ slay forever ๐
๐ฆ where this page comes from
- alpine 3.22: gzip-doc 1.14-r2 ยท GPL-3.0-or-later
- alpine 3.23: gzip-doc 1.14-r3 ยท GPL-3.0-or-later
- alpine 3.24: gzip-doc 1.14-r3 ยท GPL-3.0-or-later
- arch rolling: gzip 1.15-1 ยท GPL-3.0-or-later
- centos-stream 10: gzip 1.13-4.el10 ยท GPL-3.0-or-later AND GFDL-1.3-only
- centos-stream 9: gzip 1.12-2.el9 ยท GPLv3+ and GFDL
- debian bookworm: gzip 1.12-1 ยท GPL-3.0-or-later
- debian trixie: gzip 1.13-1+deb13u1 ยท GPL-3.0-or-later
- fedora 43: gzip 1.13-4.fc43 ยท GPL-3.0-or-later AND GFDL-1.3-only
- fedora 44: gzip 1.14-2.fc44 ยท GPL-3.0-or-later AND GFDL-1.3-only
- nixos 26.05: gzip 1.14
- nixos 26.05: gzip-static 1.14
- nixpkgs unstable: gzip 1.15
- opensuse-leap 16.0: gzip 1.13-160000.4.1 ยท GPL-3.0-or-later
- opensuse-leap 16.0: gzip 1.13-160000.4.1 ยท GPL-3.0-or-later
- opensuse-leap 16.0: gzip 1.13-160000.4.1 ยท GPL-3.0-or-later
- opensuse-leap 16.0: gzip 1.13-160000.4.1 ยท GPL-3.0-or-later
- ubuntu noble: gzip 1.12-1ubuntu3 ยท GPL-3.0-or-later
- ubuntu noble: gzip 1.12-1ubuntu3.2 ยท GPL-3.0-or-later
- ubuntu questing: gzip 1.13-1ubuntu4 ยท GPL-3.0-or-later
- ubuntu resolute: gzip 1.14-1~exp2ubuntu1 ยท GPL-3.0-or-later
- ubuntu resolute: gzip 1.14-1~exp2ubuntu1.1 ยท GPL-3.0-or-later
- ubuntu stonking: gzip 1.14-1~exp2ubuntu3 ยท GPL-3.0-or-later
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms