Unzip (linux command) function description: unzip the zip file syntax: unzip [-cflptuvz] [-agCjLMnoqsVX] [-P & l
Unzip (linux command)
Function description: decompress the zip file.
Syntax: unzip [-cflptuvz] [-agCjLMnoqsVX] [-P <密码> ] [Zip file] [file] [-d <目录> ] [-X <文件> ] Or unzip [-Z]
Note: unzip is the decompression program for zip compressed files.
[-Cflptuvz]
-C displays the extracted results on the screen and converts the characters properly.
-F: update an existing file.
-L displays the files contained in the compressed file.
The-p parameter is similar to the-c parameter. the decompressed result is displayed on the screen, but no conversion is performed.
-T check whether the compressed 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 extracted to the directory.
-V displays detailed information when executing the command.
-Z only displays the remarks of the compressed file.
[-AgCjLMnoqsVX] interpretation:
-A performs necessary character conversion on text files.
-B. do not convert characters in text files.
-C: The file name in the compressed file is case sensitive.
-J does not process the original directory path of the compressed file.
-L change all file names in the compressed file to lowercase letters.
-M sends the output result to the more Program for processing.
-N do not overwrite the original file during decompression.
-O does not need to ask the user first. after unzip is executed, it overwrites the original file.
-No information is displayed when q is executed.
-S converts the white space characters in the file name to the bottom line characters.
-V retains the file version information of VMS.
-X: saves the original UID/GID of the file at the same time during decompression.
-P <密码> Use the zip password option.
[Zip file] specifies the zip compressed file.
[File] specifies the files in the zip compressed file to be processed.
-D <目录> Specifies the directory to be stored after the file is decompressed.
-X <文件> Specifies which files in the. zip compressed file are not processed.
-Z unzip-Z is equivalent to executing the zipinfo command.
Example:
The linux unzip command can decompress a zip file in windows.
Unzip command
Syntax: unzip [option] Compressed file name. zip
The meanings of each option are as follows:
-X file list: decompress the file, but does not include the specified file.
-V.
-T whether the test file is damaged, but the pressure is not solved.
-D Directory: decompress the compressed file to the specified directory.
-Z only displays the annotation of the compressed file.
-N does not overwrite existing files.
-O overwrites existing files and does not require user confirmation.
-J. do not recreate the directory structure of the document and decompress all the files to the same directory.
Example 1: extract text.zip from the current directory.
$ Unzip text.zip
Example 2: decompress the compressed file text.zip under the specified directory/tmp. if the same file already exists, the unzip command must not overwrite the original file.
$ Unzip-n text.zip-d/tmp
Example 3: view the Directory of the compressed file.
$ Unzip-v text.zip
Zgrep command
The function of this command is to find a matching regular expression in a compressed file. the usage is the same as that of the grep command, except that the object operated is a compressed file. You can use the zgrep command to check whether a certain sentence exists in a compressed file.