cmdxray / commands / zcat

What does zcat do?

decompress gzip-compressed files and write the result to stdout.

▸ Explain your own zcat command →

zcat examples, explained

$ zcat access.log.gz

  • zcatdecompress gzip-compressed files and write the result to stdout
  • access.log.gzan argument passed to the command

$ zcat -f file

  • zcatdecompress gzip-compressed files and write the result to stdout
  • -fforce — read even from a terminal or non-gzip input
  • filean argument passed to the command

$ zcat data.gz | grep error

  • zcatdecompress gzip-compressed files and write the result to stdout
  • data.gzan argument passed to the command
  • |pipe — send this command's output into the next command
  • grepsearch input for lines matching a pattern
  • erroran argument passed to the command

zcat flags & options

-fforce — read even from a terminal or non-gzip input
-qsuppress warning messages

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.