Introduction to the syntax of the bzip2 command in Linux system

  

From the Linux command bzip2, it is a compression-related command. This is also true, the function of bzip2 is to compress bz2 files. This article will introduce the syntax and parameters of the bzip2 command in Linux.

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

Additional information: Bzip2 uses a new compression algorithm, and the compression effect is better than the traditional LZ77/LZ78 compression algorithm. If no parameters are added, bzip2 will compress the .bz2 file and delete the original file.

Parameters:

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

-d or --decompress Perform decompression.

-f or --force bzip2 When compressing or decompressing, if the output file has the same name as the existing file, the default will not overwrite the existing file. To override, use this parameter.

-h or --help displays help.

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

-s or --small Reduces the amount of memory used during program execution.

-t or --test Tests the integrity of the .bz2 compressed file.

-v or --verbose Displays detailed information when compressing or decompressing files.

-z or --compress Force compression.

-L,--license,

-V or --version Displays version information.

--repetitive-best Use this parameter to improve compression if there are duplicate data in the file.

--repetitive-fast Use this parameter to speed up execution if there are duplicate data in the file.

-Compression level The block size at the time of compression.

The above is the syntax and parameters of the Linux system bzip2 command. For specific use, you can go to the Linux environment to experience it.

Copyright © Windows knowledge All Rights Reserved