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