Six. Linux compression and decompression

Source: Internet
Author: User

Zip:

Zip [file name after compression] [source file] Zip compression

-R compression directory (not packaged, each of the files becomes a zip)

Unzip [file or directory] Zip decompression

Gz

gzip [source file] The source file disappears after compressing

-C > Xxx.gzip can not disappear with output directional characters

-R Directory

Gunzip = gzip-d Decompression

BZ2:

bzip2 [Source file] The source file disappears after compressing

-K Preserve Source files

Note: This command cannot compress the directory

BUNZIP2 = bzip2-d Decompression

Package Command tar:

TAR-CVF package file name Source path

-C Packaging

-V Display procedure

-f Specifies the file name after packaging

-X Solution Pack

-T only look at the pressure

-Z directly packaged and compressed to GZ

-j compressed to bz2 after direct packaging

Cases:

TAR-CVF Tmp.tar TMP simply packaged as tar

TAR-ZCVF tmp.tar.gz tmp packaged as tar and compressed to GZ

TAR-ZXVF tmp.tar.gz Unpacking GZ

TAR-JCVF tmp.tar.bz2 tmp packaged as tar and compressed to bz2

TAR-JXVF tmp.tar.bz2 Decompression Solution Packaging BZ2

Six. Linux compression and decompression

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.