mirror of
https://github.com/Erreur32/cheat.git
synced 2024-11-01 05:21:06 +01:00
c65fde1b3a
Add extract a .tar in specified Directory
35 lines
950 B
Plaintext
35 lines
950 B
Plaintext
# To extract an uncompressed archive:
|
|
tar -xvf /path/to/foo.tar
|
|
|
|
# To create an uncompressed archive:
|
|
tar -cvf /path/to/foo.tar /path/to/foo/
|
|
|
|
# To extract a .gz archive:
|
|
tar -xzvf /path/to/foo.tgz
|
|
|
|
# To create a .gz archive:
|
|
tar -czvf /path/to/foo.tgz /path/to/foo/
|
|
|
|
# To list the content of an .gz archive:
|
|
tar -ztvf /path/to/foo.tgz
|
|
|
|
# To extract a .bz2 archive:
|
|
tar -xjvf /path/to/foo.tgz
|
|
|
|
# To create a .bz2 archive:
|
|
tar -cjvf /path/to/foo.tgz /path/to/foo/
|
|
|
|
# To extract a .tar in specified Directory:
|
|
tar -xvf /path/to/foo.tar -C /path/to/destination/
|
|
|
|
# To list the content of an .bz2 archive:
|
|
tar -jtvf /path/to/foo.tgz
|
|
|
|
# To create a .gz archive and exclude all jpg,gif,... from the tgz
|
|
tar czvf /path/to/foo.tgz --exclude=\*.{jpg,gif,png,wmv,flv,tar.gz,zip} /path/to/foo/
|
|
|
|
# To use parallel (multi-threaded) implementation of compression algorithms:
|
|
tar -z ... -> tar -Ipigz ...
|
|
tar -j ... -> tar -Ipbzip2 ...
|
|
tar -J ... -> tar -Ipixz ...
|