Compress & Decompress File using bzip2, bunzip2 & bzcat Tool

Compress using bzip2 or bunzip2

bzip2 FILENAME

Decompress using bzcat

bunzip FILENAME.bz2

Options

-c : Compress or decompress to standard output.
-d : Force decompression. bzip2, bunzip2 and bzcat are really the same program, and the decision about what actions to take is done on the basis of which name is used. This flag overrides that mechanism, and forces bzip2 to decompress.
-z : The complement to -d: forces compression, regardless of the invocation name.
-t : Check integrity of the specified file(s), but don’t decompress them. This really performs a trial decompression and throws away the result.
-f : Force overwrite of output files. Normally, bzip2 will not overwrite existing output files. Also forces bzip2 to break hard links to files, which it otherwise wouldn’t do.
-k : Keep (don’t delete) input files during compression or decompression.
-v : Verbose mode — show the compression ratio for each file processed. Further -v’s increase the verbosity level, spewing out lots of information which is primarily of interest for diagnostic purposes.
-L or -V : Display the software version, license terms and conditions.

Note

The compress file will have the bz2 name extension.

You May Also Like

Leave a Reply?