ZDIFF(1)

πŸ“¦
version 1.15 Β· 2 versions
, in alpine 3.24

πŸ’… ZDIFF(1) β€” the zdiff girlies' guide ✨

okay so bestie, welcome to zdiff from the zutils crew β€” this is the User Commands section of the manual and honestly? it's giving "compare my vibes to yours" energy. πŸ¦‹


✨ NAME ✨

zdiff β€” decompress stuff and compare two files line by line. that's it, that's the whole gig. πŸ’–


🌸 SYNOPSIS 🌸

zdiff [options] file1 [file2]

πŸŽ€ DESCRIPTION πŸŽ€

so zdiff literally compares two files, and if they don't match it writes the differences to standard output, line by line. 🫢

a hyphen - used as a file argument means standard input β€” yep, the classic. and if any file you hand over is compressed, zdiff uses its decompressed content instead. iconic behaviour honestly.

zdiff is a front end to the program diff, and it has one limitation you need to know about: messages from diff refer to temporary file names instead of the ones you actually specified. not a bug, just how it is, iykyk. πŸ™ˆ

zdiff -v -V prints the version of the diff program used. πŸ‘‘

the formats supported are bzip2, gzip, lzip, xz, and zstd. slay. 🌈

zdiff compares file1 to file2. standard input is used only if file1 or file2 refers to standard input. and if file2 is omitted, zdiff 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. it's out here doing the searching so you don't have to. πŸ”₯

exit status is 0 if inputs are identical, 1 if different, 2 if trouble. and bestie, hear me: some options only work if the diff program used supports them. so if something's not vibing, check your diff. πŸ’€


πŸ’… OPTIONS πŸ’…

  • -h, --help β€” display this help and exit πŸ₯°
  • -V, --version β€” output version information and exit
  • -a, --text β€” treat all files as text
  • -b, --ignore-space-change β€” ignore changes in the amount of white space
  • -B, --ignore-blank-lines β€” ignore changes whose lines are all blank
  • -c β€” use the context output format
  • -C, --context=<n> β€” same as -c but use <n> lines of context
  • -d, --minimal β€” try hard to find a smaller set of changes (it's putting in the effort fr fr)
  • -E, --ignore-tab-expansion β€” ignore changes due to tab expansion
  • -i, --ignore-case β€” ignore case differences
  • -M, --format=<list> β€” process only the formats in <list>
  • -N, --no-rcfile β€” don't read runtime configuration file
  • -O, --force-format=[<f1>][,<f2>] β€” force one or both input formats
  • -p, --show-c-function β€” show which C function each change is in
  • -q, --brief β€” output only whether files differ
  • -s, --report-identical-files β€” report when two files are identical (yes queen, tell us when they match 🫢)
  • -t, --expand-tabs β€” expand tabs to spaces in output
  • -T, --initial-tab β€” make tabs line up by prepending a tab
  • -u β€” use the unified output format
  • -U, --unified=<n> β€” same as -u but use <n> lines of context
  • -v, --verbose β€” verbose mode (for --version)
  • -w, --ignore-all-space β€” ignore all white space
  • -W, --width=<n> β€” output at most <n> print columns (for -y)
  • -y, --side-by-side β€” output in two columns
  • --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. don't forget un, she's important. 🌟


πŸ› REPORTING BUGS πŸ›

found a bug? don't gatekeep, report it to zutils-bug@nongnu.org πŸ’Œ

zutils home page: http://www.nongnu.org/zutils/zutils.html


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. and listen β€” there is NO WARRANTY, to the extent permitted by law. no cap, none. πŸ’€


πŸ’œ SEE ALSO πŸ’œ

the full documentation for zdiff is maintained as a Texinfo manual. if the info and zdiff programs are properly installed at your site, the command

info zutils

should give you access to the complete manual. go off, read the whole thing, i believe in you. 🧚


and that's the tea, bestie β€” this page is from zutils version 1.15, dated May 2025. mwah, go compare some files πŸ’‹πŸ’–

πŸ“¦ where this page comes from