Linux Learning Private notes-Compressed Files command

Source: Internet
Author: User

The commonly used compression commands are:

. zip. gz. bz2. tar.gz. tar.bz2

The. zip format can be interoperable in Linux and Windows:

Zip compressed filename Original file name: Compressed file.

Zip-r compressed Directory name Directory name: Compressed directory.

Unzip compressed file name: Extract files/directories.

gzip FileName: Compressed file, file format is. gz format automatically, and the original file disappears.

Gzip-r Original directory Name: Compressed directory, directory format, or source format, but files in the directory are compressed into. gz format.

gzip-d compressed file name: Extract files. or gunzip Compressed file name: Extract files.

Gzip-dr Zip directory Name: Unzip the directory. or Gunzip-r Compressed directory name: Unzip the directory.

bzip2 Original file name: Compressed file file format automatically for. bz2 format, and the original files disappear, bzip2 cannot compress the directory.

Bzip2-k Original file name: The compressed file file format is automatically in. bz2 format, and the original files are preserved, bzip2 cannot compress the directory.

bzip2-d compressed file name: Extract files. or bunzip2 Compressed file name: Extract files.

TAR-ZCVF compressed package name. tar.gz Original file: Compresses the original file into. tar.gz format, both directories and files can be compressed using the. tar.gz format.

TAR-ZXVF compressed package name. tar.gz: Unzip the package name. tar.gz.

TAR-JCVF compressed package name. tar.bz2 Original file: Compresses the original file into. tar.bz2 format, both directories and files can be compressed using the. tar.bz2 format.

TAR-JXVF compressed package name. TAR.BZ2: Unzip the package name. tar.bz2.

Since there are zip format why also use GZ and bz2 format, in fact, Windows also has a lot of compression format, different compression format and compression speed are different. Different formats in Linux have different scopes, so gz and bz2 formats

Linux Learning Private notes-Compressed Files command

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.