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