ZTEST(1)

🌸 ZTEST(1) β€” the check-your-compressed-files girlies' manual 🌸

okay so bestie, welcome to ztest β€” it lives in the User Commands section of the manual and it's literally here to vibe-check your compressed files. pull up a chair, we're doing this πŸ’…


✨ NAME ✨

ztest β€” check the integrity of compressed files 🫢


πŸŽ€ SYNOPSIS πŸŽ€

ztest [options] [files]

that's it. that's the whole entrance. iconic.


πŸ¦‹ DESCRIPTION πŸ¦‹

so ztest checks the integrity of the compressed files you point it at. that's the main character job, no cap. πŸ’–

it also warns you if:

  • an uncompressed file has a compressed file name extension (like, girl, why are you cosplaying), or
  • a compressed file has a wrong compressed extension.

uncompressed files are otherwise ignored β€” no notes, they're just existing.

if a file is specified as -, then the integrity of compressed data read from standard input gets checked. quick heads up though: data read from standard input must be all in the same compressed format. no mixing, we don't do that here πŸ™ˆ.

if a file fails to decompress, doesn't exist, can't be opened, or is a terminal, ztest just keeps going and tests the rest of the files β€” she does not spiral, she moves on. πŸ’… a final diagnostic is shown at verbosity level 1 or higher if any file fails the test when testing multiple files.

if no files are specified: recursive searches examine the current working directory, and nonrecursive searches read standard input. iykyk.

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

⚠️ bestie, listen. error detection in the xz format is broken. first, some xz files lack integrity information. second, not all xz decompressors can check the integrity of all xz files. third β€” and this is the wild one β€” section 2.1.1.2 'Stream Flags' of the xz format specification allows xz decompressors to produce garbage output without issuing any warning. so xz files can't always be checked as reliably as files in the other formats can. not me crying 😭 it's giving "trust issues".

πŸ”₯ OPTIONS πŸ”₯

  • -h, --help β€” display this help and exit. cute, quick, done.
  • -V, --version β€” output version information and exit. the origin story.
  • -M, --format=<list> β€” process only the formats in <list>. picky queen behavior πŸ‘‘
  • -N, --no-rcfile β€” don't read the runtime configuration file. no outside opinions, thank you.
  • -O, --force-format=<fmt> β€” force the input format. we're not guessing today.
  • -q, --quiet β€” suppress all messages. peace and quiet, she's meditating 🧘
  • -r, --recursive β€” operate recursively on directories. dig in, bestie.
  • -R, --dereference-recursive β€” recursively follow symbolic links. following the lore πŸ”—
  • -v, --verbose β€” be verbose (a 2nd -v gives more). she's a talker, and honestly? obsessed.
  • -x, --exclude=<pattern> β€” exclude files matching a shell pattern. not you, not you, definitely not you πŸ’€
  • --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

and just so we're clear: valid formats for options -M and -O are 'bz2', 'gz', 'lz', 'xz', and 'zst'. memorize it, it's on the quiz πŸ“


⭐ EXIT STATUS ⭐

  • 0 β€” if all compressed files check OK πŸŽ‰ (the good ending)
  • 1 β€” if environmental problems (file not found, invalid command-line options, I/O errors, etc) πŸ’€
  • 2 β€” if any compressed file is corrupt or invalid, or if any file has an incorrect file name extension 🚨

πŸ“ REPORTING BUGS πŸ“

found a bug? tell the girlies at zutils-bug@nongnu.org β€” they want the tea fr fr.

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


Copyright Β© 2026 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, it's serious, respect it πŸ™)


🧚 SEE ALSO 🧚

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

info zutils

should give you access to the complete manual. go read it, it's giving required reading πŸ“šβœ¨


mwah πŸ’‹ that's the whole page β€” brought to you by zutils 1.16, dated February 2026. she's polished, she's thorough, she's literally the standard. bye bestie πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from