Friday, June 29, 2012

Command to Compress/Uncompress tar.gz and tar.bz2 files


Compress folder Test/ to Test.tar.gz

tar czfv Test.tar.gz Test/
czfv = ‘Compress Zip File Verbose’
If you want bzip files, use ‘j’ instead of ‘z’.

Uncompress Test.tar.gz to folder Test/

tar -xzf Test.tar.gz
x = ‘eXtract’
Again, if you want bzip files, use ‘j’ instead of ‘z’.

No comments: