[CentOS] Bzip2 Compress directories

Sun Apr 26 22:15:16 UTC 2009
NiftyCluster Tom Mitchell <niftycluster at niftyegg.com>

On Wed, Apr 22, 2009 at 2:23 PM, James Matthews <nytrokiss at gmail.com> wrote:
> Hi,
>
> How do you get bzip2 to compress directories?

* All the files in a dir? ( you cannot compress the directory itself).

Try:
   find dir -type f -print | xargs bzip2 -v
or
   find dir -type f -print0 | xargs -0 bzip2 -v
or
   cd dir; bzip2 *

Do you want to Package all the files into a tar or cpio archive
so you can send it to someone else?

-- 
        NiftyCluster
        T o m   M i t c h e l l