Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
ZCAT(1) 			  User Commands 			 ZCAT(1)

NAME
     zcat - decompress and concatenate files to standard output

SYNOPSIS
     zcat [options] [files]

DESCRIPTION
     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
     until  one  is found. 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,  decom-
     pressed if needed, and sent to standard output. Data read from standard in-
     put  must	be  of	the  same type; all uncompressed or all in the same com-
     pressed 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.

OPTIONS
     -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

     -c, --stdout
	    ignored, for gzip compatibility

     -d, --decompress
	    ignored, for gzip compatibility

     -e     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 the input format

     -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

     -t     equivalent to '-vT'

     -T, --show-tabs
	    display TAB characters as '^I'

     -v, --show-nonprinting
	    use '^' and 'M-' notation, except for LF and TAB

     --verbose
	    verbose mode (show error messages)

     -x, --exclude=<pattern>
	    exclude files matching a shell pattern

     --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.

EXIT STATUS
     0 if no errors occurred, 1 otherwise.

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

COPYRIGHT
     Copyright (C) 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.

SEE ALSO
     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.

zutils 1.16			  February 2026 			 ZCAT(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=zcat&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help