.gz

From Computing and Software Wiki

Revision as of 17:35, 9 April 2007 by RobertLi (Talk)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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