zcat
View gzip-compressed file contents
TLDR
SYNOPSIS
zcat [options] [file ...]
DESCRIPTION
zcat decompresses gzip-compressed files and writes the uncompressed data to standard output, similar to cat for regular files. It is equivalent to gunzip -c or gzip -dc.zcat can decompress files created by gzip, zip, compress, or pack. It recognizes compressed files by their magic number, not just the .gz extension, allowing decompression of files with non-standard names.When reading from stdin, zcat will pass through data that is not in a recognized compressed format unchanged (acting like cat).
PARAMETERS
-f, --force
Force decompression even if file has multiple links or the suffix does not match.-q, --quiet
Suppress all warning messages.-v, --verbose
Display filename and compression ratio for each file.-h, --help
Display help message and exit.-V, --version
Display version information and exit.
CAVEATS
zcat only outputs to stdout; it cannot decompress files in place. For decompressing to files, use gunzip or gzip -d. On some systems (e.g., macOS), zcat may be installed as gzcat to avoid conflicts with the compress utility's zcat. Unlike gzip/gunzip, zcat does not support flags like -t (test), -l (list), -k (keep), or -r (recursive) since it only reads and decompresses to stdout.
HISTORY
zcat is part of the gzip package, originally written by Jean-loup Gailly and Mark Adler. gzip was first released in 1992 as a free replacement for the Unix compress utility, which was encumbered by patents on the LZW algorithm. The gzip package became a GNU project and is now a standard utility on Unix-like systems.
