In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the use of linux zip command to compress the file, the article is very detailed, has a certain reference value, interested friends must read it!
The zip program places one or more compressed files in a compressed archive with information about the file (name, path, date, time last modified, protection, and check information to verify file integrity). You can package the entire directory structure into a zip archive with one command.
For text files, a compression ratio of 2:1 and 3:1 is common. Zip has only one compression method (deflation) and can store files without compression. (if bzip 2 support is added, zip can also use bzip 2 compression, but these entries require a reasonable modern decompression to extract. When bzip 2 compression is selected, it replaces deflation with the default method.) Zip automatically selects two better files for each file to be compressed (deflation or storage, or bzip2 or Store if you choose bzip2).
Syntax format: zip [parameters] [file]
Common parameters:
-Q does not show instruction execution-r recursive processing, all files and subdirectories under the specified directory are processed together-z annotate the compressed file-v display instruction execution process or display version information-n does not compress files with specific suffix strings
Reference example
Package all files and folders in the / home/html/ directory to the html.zip in the current directory:
[root@linuxcool] # zip-Q-r html.zip / home/html
Delete the file a.c from the compressed file cp.zip:
[root@linuxcool] # zip-dv cp.zip a.c
Compress the mydata directory under the / home directory to mydata.zip:
[root@linuxcool] # zip-r mydata.zip mydata
Compress the abc folder and 123.txt under the / home directory into abc123.zip:
[root@linuxcool] # zip-r abc123.zip abc 123.txt
Package the logs directory into log.zip:
[root@linuxcool ~] # zip-r log.zip. / logs above are all the contents of the compressed file using linux's zip command, thank you for reading! Hope to share the content to help you, more related knowledge, welcome to 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.