LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   tarfile (https://www.linuxquestions.org/questions/linux-newbie-8/tarfile-15761/)

mikeshn 03-07-2002 10:19 AM

tarfile
 
I have directory Dir1, how can I zip the directory and make it as Dir1.tar?
Thanks

acid_kewpie 03-07-2002 10:25 AM

please refer to man pages for trivial help like using tar, it's a LOT quicker for you...

either way: tar -cvf file.tar file1 file2

Bert 03-07-2002 10:25 AM

% tar -cvf Dir1

will create

Dir1.tar

but that won't compress it. It will 'tar' it like sticking lots of files together.

% bunzip2 Dir1.tar

will (not surprisingly) make:

Dir1.tar.bz2

you could also use gzip, but I understand that bzip2 uses a better compression algorithm.

Bert

mikeshn 09-18-2003 11:43 AM

Quote:

Originally posted by Bert
% tar -cvf Dir1

will create

Dir1.tar

but that won't compress it. It will 'tar' it like sticking lots of files together.

% bunzip2 Dir1.tar

will (not surprisingly) make:

Dir1.tar.bz2

you could also use gzip, but I understand that bzip2 uses a better compression algorithm.

Bert

% bunzip2 Dir1.tar

will (not surprisingly) make:

Dir1.tar.bz2


Will not create .bz2 file, but bzip2 can create new .bz2 file.

bunzip2 can just unzip a file.


All times are GMT -5. The time now is 01:09 AM.