diff options
author | neodarz <neodarz@neodarz.net> | 2018-03-20 09:30:09 +0100 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2018-03-20 09:32:22 +0100 |
commit | 7f49a93cd1ff140c2a619e5ff5d3c354c7e7d354 (patch) | |
tree | 963aff68d0adff7df9618a384a102197f3eeddea /cheat/.cheat/tar | |
parent | 6fcffe1db1f09adde6115854eb6fdde4dcdc3d19 (diff) | |
download | dotfiles_ascii-7f49a93cd1ff140c2a619e5ff5d3c354c7e7d354.tar.xz dotfiles_ascii-7f49a93cd1ff140c2a619e5ff5d3c354c7e7d354.zip |
Add some other cheat
Diffstat (limited to 'cheat/.cheat/tar')
-rw-r--r-- | cheat/.cheat/tar | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/cheat/.cheat/tar b/cheat/.cheat/tar new file mode 100644 index 0000000..41173b2 --- /dev/null +++ b/cheat/.cheat/tar @@ -0,0 +1,34 @@ +# 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 ... |