Linux compression, archiving tools

Source: Internet
Author: User

1, gzip/bzip2/xz [-#] file, can only compress files, non-compressible directory.

Common parameters:

-#: Specify compression ratio 1-9, default is 6

-D: Expand, unzip

A. gzip,gunzip=gzip-d, the default compression has the original file deletion, decompression after the compressed file deletion.

-C: Output compression results to the screen, which can be saved as a compressed file using redirection, preserving the original file.

Gzip-c mmm > mmm.gz


Gzip mmm

Gzip-d mmm.gz


Do not press to view compressed files Zcat file


B. bzip2,bunzip2=bzip2-d


Do not press to view compressed files Bzcat file


c.xz,unxz=xz-d, higher compression ratio


Do not press to view compressed files Xzcat file


2, Zip ZipFile sourcefile can either compress the document or compress the directory. Expand: Unzip

The zip file.zip fileName, if it is a file, is compressed in this format.

Zip Dir.zip dir/*, if it is a directory, compressed in this format, note *, forget * The files in the directory will not be compressed into the compressed file.


3. Archive tar [option]-f file.tar file1 .... To archive multiple files as one file

-C: Create an archive

-X: Expand Archive

-T: Do not expand to view archived file contents



-Z: Call gzip

-j:bzip2

-j:xz

Therefore, the following three sets of parameters appear.

-zcf,-zxf

-jcf,-jxf

-jcf,-jxf

Note F is used to specify the file, F must be put to the last.


Linux compression, archiving tools

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.