cmdxray / commands / gunzip

What does gunzip do?

decompress .gz files created by gzip.

▸ Explain your own gunzip command →

gunzip examples, explained

$ gunzip archive.gz

  • gunzipdecompress .gz files created by gzip
  • archive.gzan argument passed to the command

$ gunzip -k data.gz

  • gunzipdecompress .gz files created by gzip
  • -kkeep (don't delete) the compressed input file
  • data.gzan argument passed to the command

$ gunzip -c logs.gz | less

  • gunzipdecompress .gz files created by gzip
  • -cwrite the result to stdout and keep the original
  • logs.gzan argument passed to the command
  • |pipe — send this command's output into the next command
  • lessview text one screen at a time (a pager)

gunzip flags & options

-kkeep (don't delete) the compressed input file
-cwrite the result to stdout and keep the original
-fforce decompression, overwriting existing files
-vverbose — show name and compression ratio
-ttest the integrity of the compressed file without extracting
-llist the contents and compression stats of an archive
-rrecurse into directories, decompressing every file

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.