Tar Archive

From KevinWiki

Revision as of 05:42, 29 September 2008 by Kevin (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Tar

Tar is both a file format and the programme to handle that file.

Create GZipped Tar File

$ tar -czvf tar_file_name.tar.gz input_file_or_directory_1 input_file_or_directory_2 ...

Extract GZipped Tar File

$ tar -xzvf tar_file_name.tar.gz

To extract file to a specific directory, use this.

$ tar -xzvf tar_file_name.tar.gz -C /directory/destination_directory

List Files Inside Tar File

$ tar -tzf tar_file_name.tar.gz

Create GZipped Tar with NOT GNU Tar

$ tar -cvf - input_file_or_directory_1 input_file_or_directory_2 | gzip > tar_file_name.tar.gz

-If gzip is not available, use compress instead.

Extract GZipped Tar with NOT GNU Tar

gunzip -c tar_file_name.tar.gz | tar -xvf -

-If gunzip is not available, user uncompress instead.

Personal tools