Scroll to navigation

ZCAT(1) User Commands ZCAT(1)


zcat - decompress and concatenate files to standard output


zcat [options] [files]


Zcat copies each given file to standard output. If any given file is compressed, its decompressed content is used. If a given file 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 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 compression 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 and xz.

Exit status is 0 if no errors occurred, non-zero otherwise.


-h, --help
display this help and exit
-V, --version
output version information and exit
-A, --show-all
equivalent to '-vET'
-b, --number-nonblank
number nonblank output lines
equivalent to '-vE'
-E, --show-ends
display '$' at end of each line
-M, --format=<list>
process only the formats in <list>
-n, --number
number all output lines
-N, --no-rcfile
don't read runtime configuration file
-O, --force-format=<fmt>
force given format (bz2, gz, lz, xz)
-q, --quiet
suppress all messages
-r, --recursive
operate recursively on directories
-R, --dereference-recursive
recursively follow symbolic links
-s, --squeeze-blank
never more than one single blank line
equivalent to '-vT'
-T, --show-tabs
display TAB characters as '^I'
-v, --show-nonprinting
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


Report bugs to
Zutils home page:


Copyright © 2019 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.
January 2019 zcat (zutils) 1.8