zip
zip dest.zip src (file)
zip -r dest.zip src (folder)
unzip dest.zip
gzip
gzip src (file)
gzip -r src (folder)
remark: src will disappear
gzip -c src > dest.gz
remark: src will be reserved
gzip -d dest.gz (file)
gunzip dest.gz (file)
gunzip -r dest.gz (folder)
bzip2
bzip2 src
remark: src will disappear
bzip2 -k src
remark: src will be reserved
bzip2 -d dest.bz2
bunzip2 dest.bz2
remark: dest.bz2 will disappear
bunzip -k dest.src
remark: dest.bz2 will be reserved
remark: bzip2 can not operate folder
tar.gz
tar -zcvf dest.tar.gz src
tar -zxvf dest.tar.gz
tar.bz2
tar -jcvf dest.tar.bz2 src
tar -jxvf src.tar.bz2
remark:
tar -jxvf dest.tar.bz2 [-C path] (assign the path)
tar -ztvf dest.tar.gz (look insight the folder, not decompression)