Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use the bzip2 command in linux to compress the bz2 file

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail about the use of linux bzip2 command bz2 file compression program, the editor thinks it is very practical, so share it for you to do a reference, I hope you can get something after reading this article.

The English version of the bzip2 command in the Linux system is "bunzip2", that is, the compressed program in .bz2 file format; the bzip2 command system is not installed by default, and you need to install the bzip2 library to use this command.

The bzip2 command 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 produce a .bz2 compressed file after compressing the file and delete the original file.

Syntax format: bzip2 [parameters] file system

Common parameters:

-c send the results of compression and decompression to standard output-d to perform decompression-fbzip2 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 overwrite, use this parameter-kbzip2 deletes the original file after it is compressed or decompressed. To keep the original file, use this parameter-s to reduce the amount of memory used during program execution-t test the integrity of the .bz2 compressed file-v when compressing or decompressing the file, display detailed information-z force compression

Reference example

Compress the file:

[root@linuxcool ~] # bzip2 a.txt

Check file integrity:

[root@linuxcool ~] # bzip2-t a.txt.bz2 on the use of linux bzip2 command bz2 file compression program to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report