Wednesday, October 17, 2012

18 - tar an untar command in linux

For creating a tar gzipped archive we need to use tar command:

tar -cvzf File_name.tar.gz directory_name/

In this command,
c is create a new archive,
v is verbosely list files which are processed,
z is filter the archive through gzip,
f is following is the archive file name.

For extracting a gzipped tar archive (*.tar.gz) we need to use again tar command, but with appropriate option:

tar -xvzf archive_name.tar.gz

in this command, 
x is extracting files from the archive file.

No comments:

Post a Comment