In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
In this article, the editor introduces in detail "how to use the Linux gzip command", the content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to use the Linux gzip command" can help you solve your doubts.
In the Linux system, gzip is a command that often uses the compression and decompression of files, which can be used together with the tar command to form a more popular compressed file format in the Linux operating system.
Syntax gzip [- acdfhlLnNqrtvV] [- S] [-] [--best/fast] [file.] Or the gzip [- acdfhlLnNqrtvV] [- S] [-] [--best/fast] [directory] parameter-an or-ascii uses ASCII literal mode.
-c or-stdout or-to-stdout outputs the compressed file to a standard output device without changing the original file.
-d or-decompress or-- uncompress unpack the compressed file.
-f or-force forcibly compress the file. Regardless of whether the file name or hard connection exists and whether the file is a symbolic link.
-h or-help online help.
-l or-list lists information about the compressed file.
-L or-license displays version and copyright information.
When-n or-no-name compresses a file, the original file name and timestamp are not saved.
Save the original file name and timestamp when-N or-name compresses the file.
-Q or-quiet does not display a warning message.
-r or-recursive recursive processing, processing all files and subdirectories under the specified directory together.
-S or-- suffix changes the compressed suffix string.
-t or-test tests whether the compressed file is correct.
-v or-verbose displays the instruction execution process.
-V or-version displays version information.
-Compression efficiency is a value between 1Mui 9 and the default value is "6". The higher the specified value, the higher the compression efficiency.
-best the effect of this parameter is the same as specifying the "- 9" parameter.
-fast this parameter has the same effect as specifying the "- 1" parameter.
Case demonstration: compress each file in the test6 directory into a .gz file
Gzip`` * decompress each compressed file in the above example and list the detailed information
Gzip``-dv * shows in detail the information of each compressed file in example 1, and does not extract it.
Gzip``-l * compress a tar backup file with a .tar.gz extension
Gzip``-r log.`tar recursive compressed directory
Gzip``-rv test6 like this, all the files under the test become .gz, the directory still exists, but the files in the directory become .gz. This is compression, which is different from packaging. Because it is a directory operation, you need to add the-r option so that the subdirectories can also be recursed.
Recursively extract the directory
Gzip``-dr test6 has finished the introduction of this article "how to use the Linux gzip command". If you want to master the knowledge points of this article, you still need to practice and use it. If you want to know more about related articles, please follow the industry information channel.
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.