Commonly used compression formats:. zip. gz. bz2. tar.gz. tar.bz2
1.Zip
Compressed files: Zip Compressed file name source file
Compressed directory: Zip-r compressed file name source file
Unzip. zip file: Unzip compressed file
2.gz
Gzip source files: Compressed files in. gz format, source files disappear
Gzip-c source Files > Compressed files: Preserving source files
Gzip-r Directory: Compress all sub-files in the directory, but cannot compress the directory
gzip-d Compressed Files: extracting
Gunzip Compressed Files: extracting
3.bz2
bzip2 source file: Compressed to. bz2 format, without preserving source files
Bzip2-k source files: preserving source files
Cannot compress directory
bzip2-d Compressed Files
BUNZIP2 Compressed Files
4.tar.gz
Packaging commands, and then compressing
TAR-CVF package file name source file
-C: Packaging
-V: Display procedure
-F: Specifies the file name after packaging
Unpacking commands
TAR-XVF Package file name
The tar.gz format is packaged in. tar format and then compressed into. gz format
TAR-ZCVF compressed package name. tar.gz Source File
-Z: Compressed to. tar.gz format
TAR-ZXVF compressed package name. tar.gz
-X: Unzip. tat.gz. Format
5.tar.bz2
TAR-JCVF compressed package name. tar.bz2 Source File
-J: Compressed to. tar.bz2 format
TAR-JXVF-C (Specifies the decompression location) to compress the package name. tar.bz2
-X: Unzip. tat.bz2. Format
TAR-ZTVF compressed file name: viewing compressed files
linux-Compression and Decompression commands