User Tools

Site Tools


tar

This is an old revision of the document!


Command Explanation
-z unzip
-x extract file
-v verbose
-f Force
-t table of contents

Create Tar with Gzip Compression

tar -cvzf filename.tar.gz directoryORfileToCompress 

Compress with date in filename
tar -cvzf filename.$(date +"%Y-%m-%d").tar.gz directoryORfileToCompress 

Test the contents of an archive

The following command can be used to view the contents of an archive. You can then decide if you wish to strip a component when uncompressing

tar tvf filename.tar.gz

Extract

tar -xzvf filename.tar.gz

tar.1483957115.txt.gz · Last modified: 2024/05/23 07:26 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki