Search This Blog

Sunday, July 31, 2011

Archive, compress, unpack and uncompress files using tar, star, gzip, and bzip2

1)Making tar from folder named test
#tar -cvf test.tar test

2)Untarring
#tar -xvf test.tar

3)To convert to test.Z
# compress test.tar

4)uncompress
# uncompress test.tar.Z

5)gzip
(compress)
#gzip test.tar
(uncompress)
#gunzip test.tar.gz
or
(compress)
#tar -zcvf test.tar.gz folder_to_compress
(uncompress)
#tar -zxvf test.tar.gz


6)bzip2
#bzip2 test.tar
or
(compress)
#tar -jcvf test.tar.bz2 folder_to_compress
(uncompress)
#tar -jxvf test.tar.bz2

No comments: