.gz

From Computing and Software Wiki

(Difference between revisions)
Jump to: navigation, search
(Use GNU Tar to Handle .tar.gz files)
 
Line 1: Line 1:
-
'''Use GNU Tar to Handle .tar.gz files '''  
+
 
 +
== '''Use GNU Tar to Handle .tar.gz files ''' ==
 +
On Linux, you still can create a .tar.gz file or extract files from a .tar.gz file in the same way as in Unix (as when use a non-GNU tar).  
On Linux, you still can create a .tar.gz file or extract files from a .tar.gz file in the same way as in Unix (as when use a non-GNU tar).  

Current revision as of 17:35, 9 April 2007

Use GNU Tar to Handle .tar.gz files

On Linux, you still can create a .tar.gz file or extract files from a .tar.gz file in the same way as in Unix (as when use a non-GNU tar).

Most Linux are equipped with a GNU tar, which has a -z option allowing users to zip or unzip the target files. With this z option, users can pack and compress ( or unpack and uncompress) files in a single step.

To create a .tar.gz file:

tar -czvf File_Name.tar.gz File1 File2 File3 ... This will pack File1, File2, File3 and other files on the list and compress them to create a File_Name.tar.gz file. To extract files from a .tar.gz file: .

tar -xzvf File_Name.tar.gz This will uncompress and unpack File_Name.tar.gz

Personal tools