Linux bzip2 command

Linux bzip2 command is .bz2 file compression program.

bzip2 new compression algorithm, compression than conventional LZ77 / LZ78 compression algorithms to well. If you do not add any parameters, bzip2 compressed file will have the .bz2 compressed the file, and delete the original file.

grammar

bzip2 [-cdfhkLstvVz] [- repetitive-best] [- repetitive-fast] [- compression level] [to compress files]

Parameters :

  • -c --stdout or the compression and decompression result to standard output.

  • -d or --decompress perform decompression.

  • -f or --force bzip2 during compression or decompression, if the output file with the same name as an existing file, the default will not overwrite an existing file. To override, use this parameter.

  • -h or --help Displays help.

  • -k or --keep bzip2 compression or after decompression, will delete the original file. To retain the original file, use this parameter.

  • -s or --small reduce memory usage during program execution.

  • -t or test --test .bz2 compressed file integrity.

  • When the -v or --verbose compress or decompress files, displaying detailed information.

  • -z or --compress enforcement compression.

  • -L,--license,

  • -V or --version display version information.

  • --repetitive-best if there are recurring data file, you can use this parameter to improve compression.

  • --repetitive-fast data if there are recurring file, this parameter can be faster execution.

  • - the level of compression block size when compressed.

Examples

Decompress .bz2 file

[[email protected] ~] # bzip2 -v temp.bz2 // extract file display detailed processing information

Compressed file

[[email protected] ~]# bzip2 -c a.c b.c c.c

Check the file integrity

[[email protected] ~]# bzip2 -t temp.bz2


Guess you like

Origin blog.51cto.com/13293070/2401526