In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to use the Linux command gzip. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.
Linux common command gzip command is used to compress files, gzip is a widely used compression program, files compressed by it, the name will be followed by an additional ".gz" extension
Syntax gzip [-acdfhlLnNqrtvV][-S ][-][--best/fast][File...] or gzip [-acdfhlLnNqrtvV][-S ][-][--best/fast][catalog] Parameters:
-a or-ascii Use ASCII text mode.
-c or-stdout or-to-stdout Output the compressed file to standard output devices without altering the original file.
-d or-decompress or--uncompress to decompress files.
-f or-force Forcibly compresses files. Regardless of whether a file name or hard link exists and whether the file is a symbolic link.
-h or-help Online Help.
-l or-list Lists information about compressed files.
-L or-license Displays version and copyright information.
-n or-no-name When compressing a file, the original file name and timestamp are not saved.
-N or-name When compressing a file, save the original file name and timestamp.
-q or-quiet does not display warning messages.
-r or-recursive Recursive processing, all files and subdirectories in the specified directory are processed together.
-S or--suffix Change the compressed suffix string.
-t or-test Tests whether the compressed file is correct.
-v or-verbose shows the execution of the instruction.
-V or-version Displays version information.
- Compression efficiency is a value between 1-9, the default value is "6", the higher the specified value, the higher the compression efficiency.
- best This parameter has the same effect as specifying the "-9" parameter.
- fast This parameter has the same effect as specifying the "-1" parameter.
Example zip file
[root root@runoob.com a]# ls //Show current directory file a.c b.h d.cpp [root@runoob.com a]# gzip * //All files in compressed directory [root@runoob.com a]# ls //Show current directory file a.c.gz b.h.gz d.cpp.gz [root@runoob.com a]#Follow example 1 and list detailed information
[root root@runoob.com a]# gzip -dv * //extract the file and list the details a.c. gz: 0.0% -- replaced with a.c b.h.gz: 0.0% -- replaced with b.h d.cpp.gz: 0.0% -- replaced with d.cpp [root@runoob.com a]#Following example 1, displaying compressed file information
[root@runoob.com a]# gzip -l * compressed uncompressed ratio uncompressed_name 24 0 0.0% a.c 24 0 0.0% b.h 26 0 0.0% d.cpp Thank you for reading! About "Linux common command gzip how to use" This article is shared here, I hope the above content can have some help for everyone, so that everyone can learn more knowledge, if you think the article is good, you can share it to let more people see it!
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.