_ _
___ | |__ __ _ _______ | |_
/ _ \| '_ \ / _` |_ / _ \| __|
| (_) | | | | (_| |/ / (_) | |_
\___/|_| |_|\__,_/___\___/ \__|
tar —
archive tool: usage
tar -[v][zj][xc]f TAR_FILE
[DIRECTORY|DIRECTORY/*]
If DIRECTORY is not specified, when extracting, it's
extracted to the current directory.
| -c |
: compress |
| -x |
: extract |
| -v |
: verbose |
| -f TAR_FILE |
: use specified TAR_FILE |
| -z |
: use gzip compression |
| -j |
: use bzip2 compression |
| -t |
: list archive contents |
| -C DIR |
: cd to directory |
The options can be collapsed but f needs to be the last option.
Eg.:
tar -zvxf tar_file
| - Filename(s) can be specified to extract only specified file(s). |
| - The full path inside the tar file needs to be specified. |
d1/file1 d2/file2 $ tar -zxf tar_file d1/file1