Zip:
Zip [file name after compression] [source file] Zip compression
-R compression directory (not packaged, each of the files becomes a zip)
Unzip [file or directory] Zip decompression
Gz
gzip [source file] The source file disappears after compressing
-C > Xxx.gzip can not disappear with output directional characters
-R Directory
Gunzip = gzip-d Decompression
BZ2:
bzip2 [Source file] The source file disappears after compressing
-K Preserve Source files
Note: This command cannot compress the directory
BUNZIP2 = bzip2-d Decompression
Package Command tar:
TAR-CVF package file name Source path
-C Packaging
-V Display procedure
-f Specifies the file name after packaging
-X Solution Pack
-T only look at the pressure
-Z directly packaged and compressed to GZ
-j compressed to bz2 after direct packaging
Cases:
TAR-CVF Tmp.tar TMP simply packaged as tar
TAR-ZCVF tmp.tar.gz tmp packaged as tar and compressed to GZ
TAR-ZXVF tmp.tar.gz Unpacking GZ
TAR-JCVF tmp.tar.bz2 tmp packaged as tar and compressed to bz2
TAR-JXVF tmp.tar.bz2 Decompression Solution Packaging BZ2
Six. Linux compression and decompression