Review and improvement of small white 7

Source: Internet
Author: User
Tags bz2

Compress and decompress, archive

Compress command

Compress compression (early compression command)

Uncomprss Decompression


Compression ratio: (compressed file size before-compressed file size): File size before compression


gzip [option] fileName (. gz)

-D Decompression

-# (1-9) specifies the compression ratio, which defaults to 6.

Gunzip filename.gz

Zcat filename.gz to view the contents of a file without decompressing


bzip2 [option] fileName (. bz2)

-D Unzip the file

-# (1-9) specifies the compression ratio, which defaults to 6.

-K to retain the original file after compression

BUNZIP2 filename.bz2 Extract Files

Bzcat viewing the source document without decompressing


XZ [option] fileName (. gz)

-D Unzip the file

-# (1-9) specifies the compression ratio, which defaults to 6.

-K to retain the original file after compression

UNZX Decompression

Zxcat viewing the source document without decompressing


1, compression algorithm is different, compression ratio of the same

2. bZIP gzip can only compress files, cannot archive files

3. The three commands will delete the original file after the compression is complete, and the decompression is also

4, the so-called uncompressed view file is actually looking for a temporary directory decompression


Archive Command (archive does not mean compression)

Zip: Can be archived and can be compressed

Zip filename.zip file file1 file2 .... (The original file will not be deleted after compression)

Unzip decompression


Tar Archive tool

-C Create an archive file

-F Filename.tar Operation Archive (must follow the file name after-f)

-X Expand Document

-ZCF archive files and call the GZIP compression tool

-ZXF call gzip Unzip and expand archive | (Z can be omitted, will be identified from the suffix name)

-JCF archive file and call bZIP compression tool

-JXF Call bZIP Extract and expand archive

-JCF archive file and call the XZ compression tool

-JXF Call XZ Extract and expand archive

Cpio: Archive Tool


Review and improvement of small white 7

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.