Friday, August 29, 2008

Usage of Tar command

Some Tricks with unix command 'Tar'

Tar is an archiving program designed to store and extract files from an archive file known as a tarfile. Here the commands are for Online compression of tar backup.

For online compress of files with gzip

tar cvf - * : gzip > file_name.tar.gz

For testing backup files

gunzip < file_name.tar.gz : tar tvf -

For extracting files from above compress

gunzip < file_name.tar.gz : tar xvf -

For Online extracting of files from compress tar file, this way no need to uncompress it

zcat file_name.tar.Z : tar xvf -

1 comment:

Anonymous said...

So good......