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 > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to use the zip command in Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Linux commonly used command zip command is used to compress files, zip is a widely used compression program, the compressed file suffix is .zip.
Syntax zip [- AcdDfFghjJKlLmoqrSTuvVwXyz$] [- b] [- ll] [- n] [- t] [-] [compressed file] [file.] [- I] [- x]
Parameters:
-An adjusts the executable automatic unzipping file. -b specifies the directory where the files are temporarily stored. -c comment each compressed file. -d removes the specified file from the compressed file. -D the directory name is not established in the compressed file. -f update existing files. -F attempts to repair a corrupted compressed file. -g append a compressed file to an existing compressed file instead of creating a new one. -h online help. -I only compress files that meet the criteria. -j saves only the file name and its contents, but does not store any directory names. -J deletes unnecessary data in front of the compressed file. -k uses file names in MS-DOS-compatible format. When compressing a file, replace LF characters with LF+CR characters. -ll replaces LF+CR characters with LF characters when compressing the file. -L displays copyright information. -m after compressing the file and adding the compressed file, delete the original file, that is, move the file to the compressed file. -n does not compress files with specific suffix strings. -o set the change time of the compressed file to the same as the file with the latest change time in the compressed file. -Q does not show the instruction execution process. -r Recursive processing, processing all files and subdirectories under the specified directory together. -S contains system and hidden files. -t sets the date of the compressed file to the specified date. -T check that each file in the backup file is correct. The-u parameter is similar to the-f parameter, but in addition to updating existing files, other files in the compressed file are also unzipped to a directory. -v displays instruction execution or version information. -V saves the file properties of the VMS operating system. -w if the version number is in the file name, this parameter is valid only under the VMS operating system. -x excludes eligible files when compressing. -X does not save additional file properties. -y saves the symbolic link directly, not the file that the connection points to. This parameter is valid only in systems such as UNIX. -z comment the compressed file. -$saves the volume name of the disk where the first compressed file is located. -Compression efficiency is a value between 1 and 9. Example
Package all files and folders in the / home/html/ directory to the html.zip in the current directory:
Zip-Q-r html.zip / home/html
If we are in the / home/html directory, we can execute the following command:
Zip-Q-r html.zip *
Delete the file a.c from the compressed file cp.zip
Zip-dv cp.zip a.c Thank you for your reading! This is the end of this article on "how to use zip commands in Linux". I hope the above content can be of some help to you, so that 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.
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.