cmdxray / commands / gzip

What does gzip do?

compress files with gzip (replaces the original with .gz).

▸ Explain your own gzip command →

gzip examples, explained

$ gzip -k big.log

  • gzipcompress files with gzip (replaces the original with .gz)
  • -kkeep the input file instead of deleting it
  • big.logan argument passed to the command

$ gzip -d archive.gz

  • gzipcompress files with gzip (replaces the original with .gz)
  • -ddecompress instead of compress
  • archive.gzan argument passed to the command

gzip flags & options

-9compress best (slowest); -1 is fastest, least compression
-ddecompress instead of compress
-kkeep the input file instead of deleting it
-cwrite to standard output, keep the original
-rrecurse into directories
-fforce — overwrite existing files / compress links
-vverbose — show the name and compression ratio

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.