Detailed explanation of Linux command unzip

Detailed explanation of Linux command unzip

1. unzip command

The unzip command is used to decompress the ".zip" compressed package compressed by the zip command.

1.1 Syntax

unzip(options)(parameters)

1.2 Options

Options describe
-c Display the decompressed result on the screen and perform appropriate character conversion;
-f Update existing files;
-l Display the files contained in the compressed file;
-p Similar to the -c parameter, the decompression results will be displayed on the screen, but no conversion will be performed;
-t Check whether the compressed file is correct;
-u Similar to the -f option, but in addition to updating existing files, it will also extract other files in the compressed file into the directory;
-v Display detailed information during execution;
-z Only display the comment text of the compressed file;
-a Perform necessary character conversion on text files;
-b Do not perform character conversion on text files;
-C File names within compressed files are case-sensitive;
-j The original directory path in the compressed file is not processed;
-L Change all file names in the compressed file to lowercase;
-M Send the output results to the more program for processing;
-n Do not overwrite the original files when decompressing;
-o No need to ask the user first, unzip will overwrite the original file after execution;
-P<password> Use the password option of zip;
-q No information is displayed during execution;
-s Convert blank characters in file names to underscore characters;
-V Keep the file version information of VMS;
-X When decompressing, restore the original UID/GID of the file;
-d <directory> Specify the directory where the files will be stored after decompression;
-x <file> Specify which files in the .zip archive should not be processed;
-Z unzip -Z is equivalent to executing the zipinfo command.

2. Example

unzip test.zip -> unzip test.zip to the current file unzip -n test.zip -d /tmp -> unzip test.zip to the /tmp directory and do not overwrite existing files unzip -v test.zip -> view the contents of test.zip but do not unzip it unzip -o test.zip -d tmp/ -> unzip test.zip to the /tmp directory and overwrite existing files

This concludes this article on the detailed explanation of the Linux command unzip. I hope it will be helpful for everyone’s study, and I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • How to decompress multiple files using the unzip command in Linux
  • Detailed explanation of zip compression and unzip decompression commands and their usage in Linux
  • Solution to Chinese garbled characters when unzipping in Linux

<<:  Pure CSS and Flutter realize breathing light effect respectively (example code)

>>:  Methods of adaptive web design (good access experience on mobile phones)

Recommend

Detailed steps and problem solving methods for installing MySQL 8.0.19 on Linux

I recently bought a Tencent Cloud server and buil...

Font Treasure House 50 exquisite free English font resources Part 2

Designers have their own font library, which allo...

Detailed steps for setting up a nexus server

1. The significance of building nexus service As ...

Add a startup method to Linux (service/script)

Configuration file that needs to be loaded when t...

A brief analysis of Vue's asynchronous update of DOM

Table of contents The principle of Vue asynchrono...

js implements a simple shopping cart module

This article example shares the specific code of ...

calc() to achieve full screen background fixed width content

Over the past few years, there has been a trend i...

JavaScript Basics Series: Functions and Methods

Table of contents 1. The difference between funct...

mysql5.5 installation graphic tutorial under win7

MySQL installation is relatively simple, usually ...

Install and deploy java8 and mysql under centos7

Generally, learning Java and deploying projects a...

How to block and prohibit web crawlers in Nginx server

Every website usually encounters many non-search ...

How to install and persist the postgresql database in docker

Skip the Docker installation steps 1. Pull the po...

Summary of basic usage of $ symbol in Linux

Linux version: CentOS 7 [root@azfdbdfsdf230lqdg1b...