Compression Utilities

Tar :

Create a tar ball

tar -cvf  tarfile.tar

Extract from Tar

tar -zxvf tarfile.tar

Create Tar ball with compression
tar -czvf tarfile.tar

or

tar -cjvf tarfile.tar

Display Files inside a tarball:

tar -tvf  tarball.tar

Delete a single file from inside the tarball

tar –delete  -f tarball.tar <file_to_delete>

tar –wildcards –delete  -f  tarball.tar  ‘dirname/*.txt’

Zip / Unzip :

gzip foldername

gunzip foldername

Unzip To a Directory :

unzip  zipfile.zip -d dirname