Scroll to navigation

ZTEST(1) User Commands ZTEST(1)

NAME

ztest - verify the integrity of compressed files

SYNOPSIS

ztest [options] [files]

DESCRIPTION

ztest verifies the integrity of the compressed files specified. Uncompressed files are ignored. If a file is specified as '-', the integrity of compressed data read from standard input is verified. Data read from standard input must be all in the same compressed format. If a file fails to decompress, does not exist, can't be opened, or is a terminal, ztest continues verifying the rest of the files. 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.

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

Note that error detection in the xz format is broken. First, some xz files lack integrity information. Second, not all xz decompressors can verify the integrity of all xz files. Third, section 2.1.1.2 'Stream Flags' of the xz format specification allows xz decompressors to produce garbage output without issuing any warning. Therefore, xz files can't always be verified as reliably as files in the other formats can.

Exit status is 0 if all compressed files verify OK, 1 if environmental problems (file not found, invalid flags, I/O errors, etc), 2 if any compressed file is corrupt or invalid.

OPTIONS

display this help and exit
output version information and exit
process only the formats in <list>
don't read runtime configuration file
force the format given (bz2, gz, lz, xz, zst)
suppress all messages
operate recursively on directories
recursively follow symbolic links
be verbose (a 2nd -v gives more)
set compressor and options for bzip2 format
set compressor and options for gzip format
set compressor and options for lzip format
set compressor and options for xz format
set compressor and options for zstd format

REPORTING BUGS

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

COPYRIGHT

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.

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.

January 2022 zutils 1.11