Linux compression and decompression are not just one, but there are multiple options to choose from. Even if the options behind the same command are different, the results are different, here we will summarize the Linux compression and decompression commands to help you in future work.
Note: The tar command only unpacks or packs the package without the z, j, and Z options, and does not compress the package.
◆ Suffix. tar
Unzip the command: tar xvf InFile.tar
Compression command: tar cvf OutFile.tar InFile
Compressed file type: folder
◆ Suffix .tar.gz
Unzip the command: tar zxvf InFile.tar.gz
Compression command: tar zcvf OutFile.tar.gz InFile
Compressed file type: folder
◆ Suffix .tar.bz2
Unzip the command: tar jxvf InFile.tar.bz2
Compression command: tar jcvf OutFile.tar.bz2 InFile
Compressed file type: folder
◆ Suffix. tar. Z
Unzip the command: tar Zxvf InFile.tar. Z
Compression command: tar Zcvf OutFile.tar. Z InFile
Compressed file type: folder
◆ Suffix. gz
Decompress the command: gzip-d InFile.gz or gunzip InFile.gz
Compression command: gzip InFile
File type that can be compressed: Common File/package file
◆ Suffix. zip
Unzip the command: unzip InFile.zip
Compression command: zip OutFile.zip InFile
File type that can be compressed: common file list/package file
◆ Suffix. bz2
Decompress the command: bzip2-d InFile.bz2 or bunzip2 InFile.bz2
Compression command: bzip2-z InFile
File type that can be compressed: Common File/package file
◆ Suffix. Z
Decompress the command: uncompress InFile. Z
Compression command: compress InFile
Compressed file type: package file
◆ Suffix. rar
Unzip the command: rar x InFile.rar
Compression command: rar a InFile
File type that can be compressed: Folder/common file list/package file
The Linux compression and decompression commands are almost the same, and the usage should be fine.
- Detailed introduction to the use of Linux finger commands
- Detailed introduction to the use of Linux telnet commands
- Detailed usage of Linux ftp commands
- Linux dynamic library and static library
- Discussing how to close the process to solve the problem of slow ubantu System