At Wed, 22 Apr 2009 17:30:51 -0400 CentOS mailing list <[email protected]> 
wrote:

> 
> Hi,
> 
> On Wed, Apr 22, 2009 at 17:23, James Matthews <[email protected]> wrote:
> > How do you get bzip2 to compress directories?
> 
> You use "tar" to create a tar with the directory contents, and then
> bzip2 to compress that tarfile.
> 
> You can use the "-j" option of tar to bzip2 on the fly.
> 
> This is probably what you want:
> 
> $ tar -cvjf filename.tar.bz2 dirname/
> 
> Replace "filename" and "dirname" with something that is appropriate to you.

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.

> 
> HTH,
> Filipe
> _______________________________________________
> CentOS mailing list
> [email protected]
> http://lists.centos.org/mailman/listinfo/centos
> 
>                                                                               
>            

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
[email protected]       -- http://www.deepsoft.com/ModelRailroadSystem/
                            
_______________________________________________
CentOS mailing list
[email protected]
http://lists.centos.org/mailman/listinfo/centos

Reply via email to