Scroll to navigation

ZCAT(1) User Commands ZCAT(1)


zcat - decompress and concatenate files to standard output


zcat [options] [files]


zcat copies each file argument to standard output in sequence. If any file given is compressed, its decompressed content is copied. If a file given does not exist, and its name does not end with one of the known extensions, zcat tries the compressed file names corresponding to the formats supported. If a file fails to decompress, zcat continues copying the rest of the files.

If a file is specified as '-', data are read from standard input, decompressed if needed, and sent to standard output. Data read from standard input must be of the same type; all uncompressed or all in the same compressed format.

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.

Exit status is 0 if no errors occurred, 1 otherwise.


display this help and exit
output version information and exit
equivalent to '-vET'
number nonblank output lines
equivalent to '-vE'
display '$' at end of each line
process only the formats in <list>
number all output lines
don't read runtime configuration file
force the input format
suppress all messages
operate recursively on directories
recursively follow symbolic links
never more than one single blank line
equivalent to '-vT'
display TAB characters as '^I'
use '^' and 'M-' notation, except for LF and TAB
verbose mode (show error messages)
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

Valid formats for options '-M' and '-O' are 'bz2', 'gz', 'lz', 'xz', 'zst', and 'un' for uncompressed.


Report bugs to
Zutils home page:


Copyright © 2023 Antonio Diaz Diaz. License GPLv2+: GNU GPL version 2 or later <>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.


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

info zutils

should give you access to the complete manual.

January 2023 zutils 1.12