In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to use Bzip2/Bunzip2 to deal with compressed files in the Linux system". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Like gzip, Bzip2 is a compression tool that can compress files to a smaller size than other traditional tools, but it has the disadvantage that it runs slower than gzip.
The basic usage is as follows:
A) compressed files
In general, Bzip2 has no options for compression, and the compressed file is passed as its parameter. Each file is compressed separately, and the compressed file has the suffix 'bz2''.
The code is as follows:
Bzip2 file1 file2 file3
File compression
Use the'- k 'option to keep the original file after compression or decompression.
Keep the original file after compression
B) decompression
The'- d 'option is used to decompress.
Extract the file using the-d option
You can also use bunzip2 to decompress.
The code is as follows:
Bunzip2 filename
Extract the file
Bunzip2 can extract files with suffixes bz2, bz, tbz2 and tbz. When files with tbz2 and tbz are compressed, the suffix name changes to '.tar'.
The code is as follows:
Bzip2-dc
-perform the function of decompressing files to standard output.
This is the end of the introduction of "how to use Bzip2/Bunzip2 to deal with compressed files in the Linux system". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.