Skip to content

Latest commit

 

History

History
62 lines (55 loc) · 2.86 KB

cix-gnu-tar.org

File metadata and controls

62 lines (55 loc) · 2.86 KB

GNU tar

|≣|

AuthorJohn Gilmore (all…)
Contributor(s)(all…)
Releasedgnu-2000
Sourcegnu-tar.git
Mangnu-tar.1
openbsd-tar.1
freebsd-tar.1
Homepagegnu-tar.web

GNU tar saves many files together into a single tape or disk archive, and can restore individual files from the archive. It includes multivolume support, the ability to archive sparse files, automatic archive compression/decompression, remote archives and special features that allow tar to be used for incremental and full backups. This distribution also includes rmt, the remote tape server. The mt tape drive control program is in the GNU cpio distribution.


Index

Receipts

GNU tar

gnu-tar::options

OPTTYPE++V--VDESC
--remove-filesRemove files from disk after adding them to the archive

gnu-tar::examples

tar-170117214147

creat a tarball of current working directory:

   ~$ tar -cvzf "../${PWD##*/}.tar.gz" ./

tar-170210225833

extart *.tar.gz, *.tar.bz2 files:

   ~$ tar -xzvf tarball_file.tar.gz
   ~$ tar -xjvf tarball_file.tar.bz2

tar-170927225754

copy via tar pipe while preserving file permissions:

   ~$ tar -C source_path -cpf - . | tar -C target_path -xf -

tar-171214012632

maximized compression with xz archiver:

   ~$ XZ_OPT=-9e tar cJf tarfile.tar.xz directory
   ~$ tar -cf - directory/ | xz -9 -c - > tarfie.tar.xz

xz

tar-200131212206

pack all files within current directory with further their clean up:

   ~$ tar --create --verbose --remove-files --file tarfile.tar file1 file2 file3 ... fileN
   ~$ tar -cvf tarfile.tar file1 file2 file3 ... fileN --remove-files