cmdxray / commands / bzip2

What does bzip2 do?

compress or decompress files with the Burrows-Wheeler algorithm (.bz2).

▸ Explain your own bzip2 command →

bzip2 examples, explained

$ bzip2 -k big.log

  • bzip2compress or decompress files with the Burrows-Wheeler algorithm (.bz2)
  • -kkeep — don't delete the input file after (de)compressing
  • big.logan argument passed to the command

$ bzip2 -d archive.bz2

  • bzip2compress or decompress files with the Burrows-Wheeler algorithm (.bz2)
  • -ddecompress
  • archive.bz2an argument passed to the command

bzip2 flags & options

-1use the smallest block size — least memory
-9use the largest block size — best compression (default)
-zcompress (the default action)
-ddecompress
-kkeep — don't delete the input file after (de)compressing
-fforce overwrite of existing output files
-cwrite to standard output; leave files unchanged
-ttest the integrity of the compressed file
-vverbose — show the compression ratio for each file
--decompressdecompress
--keepkeep — don't delete the input 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.