User Tools

Site Tools


tar
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.txt · Last modified: 2024/05/23 07:26 by 127.0.0.1

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