This article describes the Linux compression and decompression commands in detail, which has some reference value, interested friends can refer to this article to share with you the Linux compression and decompression commands for your reference. the specific content is as follows:
Tar command]
Decompress: tar-zxvf FileName.tar
Compression: tar-czvf FileName.tar DirName
[Gz command]
Decompress 1: gunzip FileName.gz
Decompress 2: gzip-d FileName.gz
Compression: gzip FileName
.Tar.gz and. tgz
Decompress: tar-zxvf FileName.tar.gz
Compression: tar-zcvf FileName.tar.gz DirName
Compress multiple files: tar-zcvf FileName.tar.gz DirName1 DirName2 DirName3...
[Bz2 command]
Decompress 1: bzip2-d FileName.bz2
Decompress 2: bunzip2 FileName.bz2
Compression: bzip2-z FileName
.Tar.bz2
Decompress: tar-jxvf FileName.tar.bz2
Compression: tar-jcvf FileName.tar.bz2 DirName
[Bz command]
Extract 1: bzip2-d FileName. bz
Decompress 2: bunzip2 FileName. bz
Compression: unknown
. Tar. bz
Decompress: tar-jxvf FileName.tar. bz
[Z command]
Decompress: uncompress FileName. Z
Compression: compress FileName
. Tar. Z
Decompress: tar-Zxvf FileName.tar. Z
Compression: tar-Zcvf FileName.tar. Z DirName
[Zip command]
Decompress: unzip FileName.zip
Compression: zip FileName.zip DirName
Analysis
Five independent commands]
One of them is used for compression and decompression. it can be used with other commands, but only one of them can be used.
-C: Create a compressed file
-X: extract
-T: View content
-R: append an object to the end of the compressed archive object
-U: update files in the original compressed package
[5 optional parameters]
Optional when compressing or extracting files as needed.
-Z: With the gzip attribute
-J: With the bz2 attribute
-Z: With the compress attribute
-V: displays all processes.
-O: unbind the file to the standard output
[1 required parameter]
-F: use the file name. Remember, this parameter is the last parameter and can only be followed by the file name.
The above is all the content of this article. I hope it will help you learn and support PHP.
For more details about Linux compression and decompression commands, refer to the PHP Chinese network!