Tar

From wiki.techunit.org
Jump to: navigation, search

tar command line

GZIP compression

create .tar.gz archive

tar zcvf archive.tar.gz /path/to/dir

untar .tar.gz archive

tar zxvf archive.tar.gz

bunzip2 compression

create .tar.bz2 archive

tar jcvf archive.tar.bz2 /path/to/dir

untar .tar.gz archive

tar jxvf archive.tar.bz2

lzma compression

create .tar.xz archive

tar Jcvf archive.tar.xz /path/to/dir

untar .tar.gz archive

tar Jxvf archive.tar.xz

simple tar

create .tar archive

tar cvf archive.tar /path/to/file1 /path/to/file2

untar .tar archive

tar cvf archive.tar /path/to/dir

Elliot
techUnit's cofounder