


How to use the unzip decompression command
Oct 22, 2020 am 10:51 AMHow 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<Password> 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;
-d<Directory> Specify the directory where the file will be stored after decompression;
-x<File> 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!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Tutorial on finding keywords for common Linux commands

Work content of Linux operation and maintenance engineers What does Linux operation and maintenance engineers do?

How do I configure SELinux or AppArmor to enhance security in Linux?

How do I back up and restore a Linux system?

Methods for uploading files for common Linux commands

How do I monitor system performance in Linux using tools like top, htop, and vmstat?

How do I configure a virtual private network (VPN) in Linux using OpenVPN or WireGuard?

How do I implement two-factor authentication (2FA) for SSH in Linux?
