Create a compressed archive (tape archive):
tar zcvf archive.tar.gz dir
tar jcvf archive.tar.bz2 dir
tar --lzma -cvf archive.tar.lzma
Test (list) a compressed archive:
tar ztvf archive.tar.gz
tar jtvf archive.tar.bz2
tar --lzma -tvf archive.tar.lzma
Extract the contents of a compressed archive:
tar zxvf archive.tar.gz
tar jxvf archive.tar.bz2
tar --lzma -xvf archive.tar.lzma
tar options:
c: create
t: test
x: extract
j: on the fly bzip2 (un)compression
z: on the fly gzip (un)compression
Handling zip archives
zip -r archive.zip < files> (create)
unzip -t archive.zip (test / list)
unzip archive.zip (extract)