Home>Article>Operation and Maintenance> How to use the unzip decompression command

How to use the unzip decompression command

王林
王林 Original
2020-10-22 10:51:47 28060browse

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.

How to use the unzip decompression 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;

-P3b0c6630ad8a929436e205e60a78d070 Use the zip password option;

-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;

-d7b799fe73e35dcfdc019b13f54de80e5 Specify the directory where the file will be stored after decompression;

-xa49806b1b35266a135cf3c07a1b250a6 Specify which files in the .zip compressed file are not to be processed;

-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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn