LinuxQuestions.org

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

ashlesha 07-12-2006 09:26 PM

tar
 
hi,

how do i compress a directory using tar?

tried tar -cv but it doesnt work..

thanks,
ashlesha.

gilead 07-12-2006 09:29 PM

According to man tar, you can use -z to compress with gzip, -Z to compress with compress, or -j to compress with bzip2...

I use -z when I want speed and -j when I want better compression.

ashlesha 07-12-2006 09:40 PM

ok never mind i got it
i used tar -cvvf whatever.tar whatever/
and it works!

ashlesha.

ashlesha 07-12-2006 09:40 PM

oh thanks steve, didnt see your reply before posting mine!

ashlesha.

spooon 07-12-2006 10:02 PM

Quote:

Originally Posted by ashlesha
ok never mind i got it
i used tar -cvvf whatever.tar whatever/
and it works!

ashlesha.

yes but it doesn't compress at all. tar is an archiver, you need to apply a separate program if you want to compress.


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