zcat
Overview
zcat writes gzip-compressed files to stdout as if they were uncompressed (equivalent to gzip -dc). Handy in pipelines without creating temporary files. For .xz/.zst use xzcat/zstdcat (or zcat only where your distro aliases them carefully — do not assume).
Syntax
zcat [options] [file...]
gzip -dc file.gzExamples with Explanations
Read a gzip log
zcat /var/log/syslog.1.gz | less
zcat app.log.gz | grep ERROR | tailConcatenate multiple
zcat part-*.gz > combined.logPortable explicit form
gzip -dc file.gz | jq .Notes & Pitfalls
zcaton some systems is a symlink togzip -dcand only handles gzip.
- Compressed sparse/binary data still expands fully — watch disk when redirecting.
- Prefer
zgrepwhen you only need matches.
Additional Resources
man zcat/man gzip