Linux Learning-Packaging compression

Source: Internet
Author: User

Packaging Compression

One, compress+[option]+ file name (default delete original file)

-D decompression

- C just preview the generated content, do not delete the original file, need to cooperate > use to generate the compressed file

Compress-c File > file. Z

Note: Only input compress-c file name, will display garbled, input reset return to normal

- v Show details such as compression ratio

uncompress decompression, equivalent to compress-d

zcat Preview uncompressed content, equivalent to compress-d-C, also need to cooperate with > to generate the original file

Small tip: The source files (including the original and compressed files) are not deleted when mated > used

use > to generate a new file, so the new file will be affected by Umask  

Second, gzip+[ option]+ file name (default delete original file)

- D Unzip

- C Just preview the generated content, do not delete the original file, need to cooperate > use to generate the compressed file

- N(1-9) specifies the compression ratio, the larger the value, the greater the compression ratio, the default is 6

Gunzip Decompression, equivalent to gzip-d

Third, bzip2+[option]+ file name (default delete original file)

- D Unzip

- k Keep the source file, and the resulting file permissions do not change

- N(1-9) specifies the compression ratio, the larger the value, the greater the compression ratio, the default is 9

bunzip2 Decompression, equivalent to bzip2-d

Bzcat Preview the content after decompression

Iv.. xz+[option]+ file name

- D decompression

- k preserves the source file, and the resulting file permissions do not change

- n(1-9) specifies the compression ratio, the larger the value, the greater the compression ratio, the default is 6

unxz decompression, equivalent to xz-d

xzcat preview content after decompression

Five, packaging compression

zip-r + compressed files (. zip) + source files (can be multiple)

unzip + compressed files (. zip)

Six, packaging

TAR-CVF + packaged files (. Tar) + Multiple files package multiple files into one file (do not delete source files), show details (v)

tar-xvf + package file unpacking

tar-xf + packaged files (. Tar) extracted to the current directory

tar-xf + package files (. tar.xz) + files extract a file from a compressed package to the current directory

TAR-JCVF + packaged files (. TAR.XZ) + Multiple files pack and compress multiple files

TAR-JXVF + package file unpacking and unpacking

TAR-ZCVF + packaged files (. tar.gz) + Multiple files

TAR-ZXVF + package file (. tar.gz)-C + directory to save unpacked files to the specified directory

TAR-JCVF + packaged files (. tar.bz2) + Multiple files

TAR-TF Preview content after unpacking or unpacking

TAR-RF + package file (. tar) + file path add files to the specified package file



Linux Learning-Packaging compression

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.