Detailed description of Linux compression and decompression commands

Source: Internet
Author: User
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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.