[CentOS] Bzip2 Compress directories

nate centos at linuxpowered.net
Thu Apr 23 00:49:15 UTC 2009

Frank Cox wrote:
> On Wed, 22 Apr 2009 19:29:52 -0400
> Robert Heller wrote:
>> Note that is also possible to use dump or cpio as well.  Unlike the
>> MS-Windows zip/unzip, which combines compressing and archiving in a
>> single program, the 'UNIX' way is to separate these functions.  bzip2
>> only compresses.  Other programs (tar, dump, cpio) create archives --
>> bundle a group of files and/or directory trees into a single file.
> Depending on your needs, you can obtain better compression with programs
> other
> than bzip2.  The price paid for the additional compression can be processing
> time, ram requirements, robustness, compatibility and several or none of the
> above.

pbzip2 is available too if you have more than 1 cpu core:

Though I prefer pigz(parallel gzip), both pbzip2 and pigz
are completely compatible with regular bzip2 and gzip.


bzip2 is reallly slow, but if you happen to have a 8 core
or better system you can get some pretty good speed out
of pbzip2, though in both cases the parallellness is only
available on compression not on decompression(last I

I've been using pigz on a daily basis to backup databases
for more than a year now, I always run gzip -t afterward
as part of the backup script and so far have never had
an error.


More information about the CentOS mailing list