How to use the unzip decompression command: [unzip test.zip], which means to decompress the compressed file test.zip to the current directory. The unzip command is used to decompress the [.zip] compressed package compressed by the zip command.
1. Unzip command
The unzip command is used to decompress the ".zip" compressed package compressed by the zip command.
(Video tutorial recommendation: linux video tutorial)
Syntax
unzip(选项)(参数)
Option
-c will display the decompression result to the screen and make appropriate conversions to the characters;
-f Update existing files;
-l Display the files contained in the compressed file;
- p is similar to the -c parameter, it will display the decompression result on the screen, but will not perform any conversion;
-t Check whether the compressed file is correct;
-u and - The f parameter is similar, but in addition to updating existing files, other files in the compressed file will also be decompressed into the directory;
-v Display detailed information when executing;
- z Only display the remark text of the compressed file;
-a Perform necessary character conversion on the text file;
-b Do not perform character conversion on the text file;
-C File names in compressed files are case-sensitive;
-j Does not process the original directory paths in compressed files;
-L Changes all file names in compressed files to lowercase;
-M Send the output results to the more program for processing;
-n Do not overwrite the original file when decompressing;
-o No need to ask the user first, overwrite after unzip execution The original file;
-P
-q Does not display any information when executing;
-s Change the file name to Convert the blank characters to underscore characters;
-V Keep the file version information of VMS;
-X Save the original UID/GID of the file at the same time when decompressing;
-d
-x
-Z unzip- Z is equal to executing the zipinfo instruction.
Example:
unzip test.zip ->将test.zip解压到当前文件下 unzip -n test.zip -d /tmp ->将test.zip解压到/tmp目录下,并且不要覆盖已有文件 unzip -v test.zip ->查看test.zip内容,但不解压 unzip -o test.zip -d tmp/ ->将test.zip解压到/tmp目录下,并且覆盖已有文件
Related recommendations:linux tutorial
The above is the detailed content of How to use the unzip decompression command. For more information, please follow other related articles on the PHP Chinese website!