ArticleDirectory
- Parameters
- Option
- Example
- Tips
Compressing and extracting files Bzip2 [Options] [File-list]
Bunzip2 [Options] [File-list]
Bzcat [Options] [File-list]
Bzip2recover [File]
Bzip2ProgramUsed to compress files. bunzip2 is used to restore Bzip2 compressed files. bzcat is used to display Bzip2 compressed files. bzip2recover is used to repair files damaged during Bzip2 compression.
Parameters
File-listList of path names of one or more files to be compressed/decompressed
Option
-C: Write the compressed or decompressed results to the standard output.
-D: Decompress the file compressed with Bzip2. This option is used for Bzip2-D, which is equivalent to bunzip2.
-F force compression to overwrite existing files
-K the input file is not deleted when the file is compressed or decompressed.
-Q: suppress warning information, but display key information
-T to verify the integrity of the compressed file. If the file is complete, no information is displayed.
-V displays the process information during compression or decompression.
Example
Bzip2
Siu @ darling ~ /Work $LsA B CDirSiu @ darling~ /Work $Bzip2Asiu @ darling~ /Work $LsA.bz2 B CDir
Compressed file
Bzip2-V
Siu @ darling ~ /Work $Bzip2-V B:1.123:1,7.121Bits/Byte,10.99% Saved,182 In,162Out. Siu @ darling~ /Work $LsA.bz2 B .bz2 CDir
Compress the file and display the compressed information
Bzcat
Siu @ darling ~ /Work $BzcatA.bz2 picture perfect memories scattered all around the floorreachingForThe phone'Cause I can'T fight it anymoreand I wonderIfI ever cross your mindfor me It Happens allTime
Show compressed file content
Bunzip2
Siu @ darling ~ /Work $Bunzip2A.bz2 Siu @ darling~ /Work $LsA B .bz2 CDir
Decompress the file
Bunzip2-K
Siu @ darling ~ /Work $Bunzip2-K B .bz2 Siu @ darling~ /Work $LsA B B .bz2 CDir
Decompress the file and keep the original file.
Tips
Bzip2 program compression efficiency is better than Gzip