Description of the Linux zip command in detail: Compress the file. Syntax: Zip [-acddffghjjkllmoqrstuvvwxyz$][-b < working directory >][-ll][-n < tail string >][-t < date time >][-< compression efficiency >][compressed file [Documents ...] [-i < template style;] [-x < template style;] Supplemental Note: Zip is a widely used compression program that compresses files that have a ". zip" extension. Parameter:-A adjusts the executable auto-unzip file. -b< working directory > Specifies the directory where files are temporarily stored. -C adds a comment to each compressed file. -d deletes the specified file from within the compressed file. The directory name is not established within the-D compressed file. -F The effect of this parameter is similar to specifying the "-u" parameter, but not only updates the existing file, and if some files do not already exist in the compressed file, use this parameter to add it to the compressed file. -F attempt to repair a corrupted compressed file. -G compresses the file after it is appended to the existing compressed file, rather than creating a new compressed file. -H online Help. -i< template style > compress only files that match the criteria. -j saves only the file name and its contents, not any directory names. -J Delete unnecessary data before compressing the file. -K uses the file name in MS-DOS compatible format. -L When compressing a file, replace the LF character with the LF+CR character. -ll the LF+CR character into the LF character when compressing the file. -L displays copyright information. -M compresses the file and joins the compressed file, deletes the original file, and then moves the file to the compressed file. -n< string > does not compress a file with a specific trailing string. -O to compress files that have the most recent change time in the file, set the change time for the compressed file to be the same as the file. -Q does not show the instruction execution process. -R recursively handles all files and subdirectories under the specified directory. -S contains the system and hidden files. -t< Date Time > Set the date of the compressed file to the specified date. -T checks that each file within the backup file is correct. -U replace the newer file into the compressed file. -V Displays the instruction execution process or displays version information. -V Saves the file properties of the VMS operating system. -W in the file name if the version number, this parameter is only valid under the VMS operating system. -x< template style > exclude files that match the criteria when compressing. -X does not save additional file attributes. -Y saves the symbolic connection directly, not the file that the connection points to, and this parameter is only valid under systems such as UNIX. -Z Compression textAdd comments to the item. -$ Save the volume book name of the disk where the first compressed file is located. -< compression Efficiency > Compression efficiency is a value between 1-9. linux Unzip Command details function Description: Extract zip file syntax: unzip [-cflptuvz][-agcjlmnoqsvx][-p < password >][.zip file] [file][-d < catalogue >][-x < documents;] or unzip [-z] add-on: Unzip is the unzip program for. zip compressed files. Parameters: -c Displays the extracted results to the screen and converts the characters appropriately. &NBSP;-F Update the existing file. &NBSP;-L displays the files contained within the compressed file. -p, like the-c parameter, displays the results of the decompression to the screen, but does not perform any transformations. &NBSP;-T Check that the compressed file is correct. -u is similar to the-f parameter, but in addition to updating existing files, other files in the compressed file are extracted to the directory. -v execution is when the detailed information is displayed. &NBSP;-Z displays only the memo text of the compressed file. -a the necessary character conversions for a text file. -b do not convert characters to text files. -c file names in compressed files are case-sensitive. &NBSP;-J does not handle directory paths that are contained in compressed files. -l change all the file names in the compressed file to lowercase. The -m sends the output to the more program processing. -n do not overwrite the original file when decompressing. -o does not have to ask the user first, unzip overwrite the original file after execution. -P< password > Use the zip password option. &NBSP;-Q does not display any information when it executes. -s converts white space characters in the file name to baseline characters. -v retains the file version information of the VMS. -x the original uid/gid of the file while decompressing. [.zip file] Specifies the. zip compressed file. [file] Specifies which files in the. zip archive to process. -d< directory > Specifies the directory to be stored after the file has been decompressed. -x< files > Specifies which files in the. zip archive are not processed. -z unzip-z equals execute zipinfo instruction Example: zip command canUsed to compress files into a common zip format. The unzip command is used to extract the zip file. 1. I want to compress a file abc.txt and a directory dir1 into yasuo.zip: # zip-r yasuo.zip abc.txt dir1 2. I downloaded a yasuo.zip file and wanted to extract it: # Unzip yasuo.zip 3. I have abc1.zip,abc2.zip and abc3.zip in my current directory, and I want to unzip them together: # unzip abc\? zip Comment:? Represents a character, if * denotes any number of characters. 4. I have a very large compressed file large.zip, I do not want to decompress, just want to see what is inside it: # unzip-v large.zip 5. I downloaded a compressed file large.zip, want to verify whether this compressed file download completely # unzip-t large.zip 6. I use the-v option to find that Music.zip compressed files have many directories and subdirectories, and subdirectories are actually songs mp3 files, I want to download these files to the first level directory, rather than a layer of the directory: # unzip-j music.zip
Compression and decompression of the ZIP package under Linux