The use of Linux packaging and compression tools

Source: Internet
Author: User

Compression tool: GZIP,BZIP2 compression capability is gradually enhanced
Package or compress tool: tar
Package and Compress tool: Zip compression capability is stronger than gzip and bzip2

The difference between the two types of compression tools is gzip and bzip2:

    1. Gzip and bzip2 can only compress files, zip files and directories can be compressed
    2. BZIP2 and gzip Use the same method, and compressed after the source file disappears, decompression after the compressed file disappears. bzip2 a feature bzcat, you can view the contents of the compressed file
      bzip2 [file name] compressing a file
      bzip2-d [compress filename] Unzip a compressed file
      gzip [file name] Compress a file
      gzip-d [compress filename] Unzip a compressed file
      Bzcat [compress file name] To view the contents of a compressed file
      Package or compress tool tar:
      1. Packaging capabilities for Tar
        TAR-CVF [package to be generated] [directory name] [file name] Package directory and file
        TAR-XVF [Package name] Unpacking
      2. Compression function of tar
        TAR-ZCVF [Name of the package to be generated. tar.gz] [file name] [directory name]
        ------Package files and directories, and compress (compress in gzip)
        TAR-JCVF [Name of the package to be generated. tar.bz2] [file name] [directory name]
        ------Package files and directories, and compress (compress in bzip2 mode)
        TAR-ZCVF [Zip package name. tar.gz]--exclude [exclude packaged file or directory name] [file name] [directory name]
        ------Exclude the packaging of a file or directory and compress it in gzip
      3. TAR-TF [Package name] View all files in the package
        Package and compress the tool Zip:
      4. Zip for packaging and compressing files or directories
        Zip-r [package name to be generated] [file] [directory] package files and directories, and compress
      5. Unzip for unpacking compressed packets
        Unzip [compress package name] Unzip the package
        Tar and zip: The source file is preserved after compression, and the compressed file is retained after decompression.

The use of Linux packaging and compression 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.