Name

bzip2 — stdin  stdout  - file  -- opt  --help  --version

Synopsis

bzip2 [options] [files]

The bzip2, bunzip2, and bzcat commands compress and uncompress files in Burrows-Wheeler format. Compressed files have the suffix .bz2.

Sample commands

bzip2 file

Compress file to create file.bz2. Original file is deleted.

bzip2 -c file

Produce compressed data on standard output.

cat file | bzip2

Produce compressed data from a pipeline.

bunzip2 file.bz2

Uncompress file.bz2 to create file. Original file.bz2 is deleted.

bunzip2 -c file.bz2

Uncompress the data on standard output.

cat file.bz2 | bunzip2

Uncompress the data from a pipeline.

bzcat file.bz2

Uncompress the data on standard output.

Get Macintosh Terminal Pocket Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.