Decompress the zip file in linux

Source: Internet
Author: User

The linux unzip command can decompress a zip file in windows.

Unzip command

Syntax: unzip [Option] compressed file name. Zip

The meanings of each option are as follows:

-X file list: Decompress the file, but does not include the specified file.

-V.

-T whether the test file is damaged, but the pressure is not solved.

-D directory: Decompress the compressed file to the specified directory.

-Z only displays the annotation of the compressed file.

-N does not overwrite existing files.

-O overwrites existing files and does not require user confirmation.

-J. Do not recreate the directory structure of the document and decompress all the files to the same directory.

Example 1: extract text.zip from the current directory.

$ Unzip text.zip

Example 2: Decompress the compressed file text.zip under the specified directory/tmp. If the same file already exists, the unzip command must not overwrite the original file.

$ Unzip-n text.zip-d/tmp

Example 3: view the directory of the compressed file.

$ Unzip-v text.zip

Zgrep command

The function of this command is to find a matching regular expression in a compressed file. The usage is the same as that of the grep command, except that the object operated is a compressed file. You can use the zgrep command to check whether a certain sentence exists in a compressed file.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.