File packaging and decompression under Linux

Source: Internet
Author: User
Tags unpack

Package compression of files

gzip (suffix. GZ cannot compress the directory, the source file disappears after the compression is finished)

How to use:

Gzip-1 1.txt (compressed 1.txt file compression ratio minimum compression speed fastest)

Gzip-9 1.txt (compression 1.txt file compression ratio max, compression speed fastest)

Gzip-d 1.txt.gz (Unzip the 1.txt compression pack)

bzip2 (suffix. bz2 cannot compress the directory, the source file disappears after compression)

How to use:

Bzip2-1 1.txt (compressed 1.txt file compression ratio minimum compression speed fastest)

Bzip2-9 1.txt (compression 1.txt file compression ratio max, compression speed fastest)

Bzip2-d 1.txt.bz2 (Unzip the 1.txt compression pack)

Bzcat 1.txt.bz2 (View compressed file contents)

Zip (suffix. zip and Windows. zip file Universal Compression after the source file does not disappear to compress multiple files or directories at the same time)

How to use:

Zip 1.txt.zip 1.txt (compress 1.txt and specify file name after compression)

Zip-r 111.zip 111 (Compress directory 111 and develop a compressed file name)

Unzip 1.txt.zip (unzip the 1.txt.zip file)

XZ (suffix. XZ compressed after source file disappears)

How to use:

XZ 1.txt (compression of 1.txt files)

Xz-1 1.txt (compressed 1.txt file compression ratio minimum compression speed fastest)

Xz-9 1.txt (compression 1.txt file compression ratio max, compression speed fastest)

Xz-d 1.txt.xz (Decompression of 1.TXT.XZ)

Xzcat 1.txt.xz (View 1.txt.xz compressed file contents)

Tar (packing tool)

How to use:

TAR-CVF 1.tar 111 222 1.txt 12.txt.gz (Pack 111,222,1.txt,12.txt.gz, package name 1.tar)

TAR-TF 1.tar (View contents in 1.tar package)

TAR-XVF 1.tar (uncompressed 1.tar pack)

Tar-c/TMP-XVF 1.tar (1.tar decompression to/tmp directory)

TAR-CVFZ 1.tar.gz 111 222 1.txt 12.txt.gz (packaged with 111,222,1.txt,12.txt.gz, package named 1.tar and compressed using gzip)

TAR-XVFZ 1.tar.gz (decompression and unpacking of 1.tar.gz)

TAR-TF 1.tar.gz (View the contents of the 1.tar.gz compression pack)

Tar-c/tmp/-XVFZ 1.tar.gz (unpack the 1.tar.gz package into the/tmp directory)

TAR-CVFJ 1.tar.bz2 111 222 1.txt 12.txt.gz (packaged with 111,222,1.txt,12.txt.gz, package named 1.tar and compressed using bzip2)

TAR-XVFJ 1.tar.bz2 (Unpack and unpack the 1.TAR.BZ2 package)

TAR-TF 1.tar.bz2 (View the contents of the 1.TAR.BZ2 compression pack)

TAR-CVFJ 1.TAR.XZ 111 222 1.txt 12.txt.gz (packaged with 111,222,1.txt,12.txt.gz, package named 1.tar and compressed with XZ)

TAR-XVFJ 1.tar.xz (Unpack and unpack the 1.TAR.XZ package)

TAR-TFJ 1.tar.xz (View the contents of the 1.TAR.XZ compression pack)

Filter:

Tar--exclude 1.txt--exclude 12.TXT-CVF 111 (Pack 111 directories and filter out 1.txt and 12.txt files)


File packaging and decompression under Linux

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.