LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   compressing issues (https://www.linuxquestions.org/questions/linux-software-2/compressing-issues-448672/)

ankscorek 05-26-2006 02:29 AM

compressing issues
 
hi

i uncompressed a file anks.bz2 using
#bunzip2 anks.bz2 //this gave me a compressed file called anks
#mv anks anks.tar
#tar -xvvf anks.tar

this gave me 3 dir anks1, anks2, anks3

i made the neccessary ammends in the dirs

now i want to compress them back as anks.bz2

what is the command for it?

jschiwal 05-26-2006 03:31 AM

Usually files that are tarred and bzip'ed, are created this way: tar cjf filename.tar.bz2 dir1 dir2 dir3.

The extension .tar.bz2 is used.
Look in the info manual for tar, because you may want to use additional options, such as one that tars files before the directories, so you don't end up, later when trying to extract, having the directory created with restricted permissions before the files are created.

ankscorek 05-26-2006 08:48 PM

tar -cjvf anks.bz2 .

AwesomeMachine 05-26-2006 10:19 PM

tar jxvf anks.bz2 anks1 anks2 anks3


All times are GMT -5. The time now is 02:54 AM.