Saturday, June 19, 2010

tar command basic operations

The tar (tape archive) is used to stores and extracts files from archive (no compress). It's very easy how doing to create and extract files with tar command.

Create a tar.gz archive file use the c option, if more than one files

> tar czvf archive_name.tar.gz file1 file2 file3


Create a tar.gz archive file in one folder

> tar czvf archive_name.tar.gz folder_name/*


Extract a tar.gz archive use x option

> tar xzvf file_name.tar.gz

No comments:

Post a Comment