Linux compression and packaging method 3: bzip2, bzcat command

Source: Internet
Author: User

We have met many Linux compression and packaging methods. The following describes the concepts of bzip2 and bzcat commands in Linux compression and packaging methods. This article provides a variety of examples for you to view, I believe there will be a lot of gains after reading this ....

Bzip2, bzcat command
[Root @ linux ~] # Bzip2 [-cdz] File Name
[Root @ linux ~] # Bzcat file name .bz2

Parameters:
◆-C: output the data generated during the compression process to the screen!
◆-D: extracted Parameters
◆-Z: Compression Parameters
◆-#: Same as gzip, it is used to calculate the compression ratio.-9 is the best, and-1 is the fastest!

Example 1:
Compress/tmp/man. config with bzip2.
[Root @ linux tmp] # bzip2-z man. config
At this time, man. config will become man.config.bz2!

Example 2:
Read the file content in Example 1!
[Root @ linux tmp] # bzcat man.config.bz2
The man.config.bz2 extracted file content is displayed on the screen !!

Example 3:
Decompress the file in Example 1
[Root @ linux tmp] # bzip2-d man.config.bz2

Example 4:
Compress man. config in Example 3 with the optimal compression ratio and keep the original file
[Root @ linux tmp] # bzip2-9-c man. config> man.config.bz2

The preceding section describes the bzip2 and bzcat commands in the Linux compression and packaging method. The following section describes the compress commands.

  1. Linux compression and packaging method 1)
  2. How to monitor the usage of Linux system resources
  3. Do you know Linux file extensions?
  4. A true story about Desktop Linux
  5. Common Linux backup methods

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.