Linux in a Nutshell, Third Edition
by Ellen Siever, Stephen Spainhour, Jessica P. Hekman, Stephen Figgins
Name
bzip2
Synopsis
bzip2 [options] filenames
bunzip2 [options] filenames
bzcat [option] filenames
bzip2recover filenames
Description
File compression and decompression utility similar to
gzip, but uses a different algorithm and encoding
method to get better compression. bzip2 replaces
each file in filenames with a compressed version
of the file and with a .bz2 extension appended.
bunzip2 decompresses each file compressed by
bzip2 (ignoring other files, except to print a
warning).
bzcat decompresses all specified files
to standard output, and bzip2recover is used to try
to recover data from damaged files.
Options
- --
End of options; treat all subsequent arguments as filenames.
- - dig
Set block size to dig x 100KB when compressing, where dig is a single digit from 1 to 9.
- -c, --stdout
Compress or decompress to standard output.
- -d, --decompress
Force decompression.
- -f, --force
Force overwrite of output files. Default is not to overwrite. Also forces breaking of hard links to files.
- -k, --keep
Keep input files; don’t delete them.
- -L, --license, -V, --version
Print license and version information and exit.
- -q, --quiet
Quiet. Print only critical messages.
- -s, --small
Use less memory, at the expense of speed.
- -t, --test
Check the integrity of the files, but don’t actually compress them.
- -v, --verbose
Verbose. Show the compression ratio for each file processed. Add more -v’s to increase the verbosity.
- -z, --compress
Forces compression, even if invoked as bunzip2 or bzcat.
- --repetitive-fast ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access