Home Operation and Maintenance Linux Operation and Maintenance How to use the unzip decompression command

How to use the unzip decompression command

Oct 22, 2020 am 10:51 AM
unzip

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(选项)(参数)
Copy after login

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 				-&gt;将test.zip解压到当前文件下
unzip -n test.zip -d /tmp 	-&gt;将test.zip解压到/tmp目录下,并且不要覆盖已有文件
unzip -v test.zip			-&gt;查看test.zip内容,但不解压
unzip -o test.zip -d tmp/	-&gt;将test.zip解压到/tmp目录下,并且覆盖已有文件
Copy after login

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 of this Website
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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Tutorial on finding keywords for common Linux commands Tutorial on finding keywords for common Linux commands Mar 05, 2025 am 11:45 AM

Tutorial on finding keywords for common Linux commands

Work content of Linux operation and maintenance engineers What does Linux operation and maintenance engineers do? Work content of Linux operation and maintenance engineers What does Linux operation and maintenance engineers do? Mar 05, 2025 am 11:37 AM

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 configure SELinux or AppArmor to enhance security in Linux? Mar 12, 2025 pm 06:59 PM

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

How do I back up and restore a Linux system? How do I back up and restore a Linux system? Mar 12, 2025 pm 07:01 PM

How do I back up and restore a Linux system?

Methods for uploading files for common Linux commands Methods for uploading files for common Linux commands Mar 05, 2025 am 11:42 AM

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 monitor system performance in Linux using tools like top, htop, and vmstat? Mar 17, 2025 pm 05:28 PM

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 configure a virtual private network (VPN) in Linux using OpenVPN or WireGuard? Mar 12, 2025 pm 07:02 PM

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? How do I implement two-factor authentication (2FA) for SSH in Linux? Mar 17, 2025 pm 05:31 PM

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

See all articles