tar
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tar [2015/05/06 07:39] – luke7858 | tar [2024/05/23 07:26] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | === Tar with Gzip Compression === | + | ^ Command |
| + | | -z | unzip | ||
| + | | -x | extract file | | ||
| + | | -v | verbose | ||
| + | | -f | Force | | ||
| + | | -t | table of contents | | ||
| + | |||
| + | === Create | ||
| <sxh bash> | <sxh bash> | ||
| tar -cvzf filename.tar.gz directoryORfileToCompress | tar -cvzf filename.tar.gz directoryORfileToCompress | ||
| </ | </ | ||
| - | === check the contents of an archive === | + | \\ |
| + | Compress with date in filename | ||
| <sxh bash> | <sxh bash> | ||
| - | tar tvf filename.tar.gz | + | tar -cvzf filename.$(date +" |
| </ | </ | ||
| + | \\ | ||
| + | === 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 | ||
| <sxh bash> | <sxh bash> | ||
| - | -t = table of contents | + | tar tvf filename.tar.gz |
| - | -v = verbose | + | |
| - | </ | + | |
| - | === unzip === | + | |
| - | <sxh bash> | + | |
| </ | </ | ||
| + | \\ | ||
| + | === Extract === | ||
| <sxh bash> | <sxh bash> | ||
| + | tar -xzvf filename.tar.gz | ||
| </ | </ | ||
tar.1430897946.txt.gz · Last modified: 2024/05/23 07:26 (external edit)
