Breadcrumbs 
Learning >> Documentation >> Compression >> bzip2
 
Recent News
We're No 1!
We've reached the top! (Of Google!)
[ more ]
Firefox 3 Download Day
Firefox 3 has been officially released and is looking to set a world record for the most downloaded piece of software in 24hrs.
[ more ]
SSL Renewed
SSL cert has been renewed by the admin team.
[ more ]
bzip2
bzip2

Bzip2 compresses, but its algorithm is (generally) better than gzip's.

# creates archive.tar.bz2
$ bzip2 archive.tar

# uncompresses it to recreate archive.tar
$ bunzip2 archive.tar.bz2

Bzip2 pays for its better compression with a much heavier CPU load. On a multiuser machine, it's polite to not run too many demanding programs, as this interferes with other people's use of the machine. One way to solve this is for people to reduce the priority of their demanding programs: it will take more time to finish, but it will not interrupt or disrupt other users. The best way to go about this is as follows:

$ nice -n 10 bzip2 my_big_files

See the nice manual page for more information on it.

For more information on either of these commands, check out:

# the info page for bzip2
$ info bzip2
# the manual page for nice
$ man nice

Next we'll look at how to deal with zip and rar files.