Linux Compression Packaging method serial three: bzip2, Bzcat command

Source: Internet
Author: User

There are a variety of Linux compression packaging methods, this article focuses on bzip2, the use of BZCAT commands, case description, such as the # and Gzip same, are in the calculation of compression ratio parameters, 9 best, 1 fastest.

AD:

We met a number of Linux compression packaging methods, the following explains the Linux compression packaging method of bzip2, Bzcat command concept, this article gives a variety of examples for everyone to see, I believe you will have a lot of harvest after reading ....

bzip2, Bzcat command
[[email protected] ~]# bzip2 [-cdz] File name
[[email protected] ~]# bzcat file name. bz2

Parameters:
-C: Output data generated by the compression process to the screen!
-D: decompressed parameters
-Z: Compressed parameters
-#: Same as gzip, all in the calculation of compression ratio parameters,-9 best,-1 fastest!

Example one:
Compress just the/tmp/man.config with bzip2
[Email protected] tmp]# bzip2-z man.config
At this time Man.config will become man.config.bz2!

Example two:
Read the file contents of sample one!
[Email protected] tmp]# Bzcat man.config.bz2
At this point the screen will show the contents of the file after man.config.bz2 decompression!!

Example three:
Unzip the file of example one
[Email protected] tmp]# bzip2-d man.config.bz2

Example four:
The Man.config of example three is compressed with the best compression ratio, and the original file is preserved
[[email protected] tmp]# bzip2-9-C man.config > man.config.bz2

Linux Compression Packaging method serial three: bzip2, Bzcat 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.