Tar Archive
From KevinWiki
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.