Linux zip compression and unzip decompression command detailed

Source: Internet
Author: User
Tags zip

This article mainly introduced the Zip/unzip Compression decompression command's use method and the parameter explanation, needs the friend may refer to under

 

1, the/home directory under the MyData directory compression to Mydata.zip
Zip-r Mydata.zip MyData #压缩mydata目录
2, the/home directory below the mydata.zip extract into the Mydatabak directory inside
Unzip mydata.zip-d Mydatabak
3, the/home directory under the ABC folder and 123.txt compression into Abc123.zip
Zip-r abc123.zip ABC 123.txt
4, the/home directory below the Wwwroot.zip directly extracted into the/home directory inside
Unzip Wwwroot.zip
5, the/home directory below the Abc12.zip, Abc23.zip, abc34.zip at the same time extract into the/home directory inside
Unzip Abc*.zip
6, view the contents of the wwwroot.zip below the/home directory
Unzip-v Wwwroot.zip
7, verify the/home directory below the Wwwroot.zip is complete
Unzip-t Wwwroot.zip
8, the/home directory below the wwwroot.zip of all the files extracted to the first level directory
Unzip-j Wwwroot.zip

Main parameters

-C: The uncompressed results
-L: Displays the files contained in the compressed file
-P: Similar to the-c parameter, the uncompressed results are displayed to the screen but no conversions are performed
-T: Check that the compressed file is correct
-u: Similar to the-f argument, However, in addition to updating an existing file, other files in the compressed file are extracted to the directory
-V: Show detailed information when execution is performed
-Z: Only the memo text for compressed Files
-A: Make necessary character conversions to text files
- B: Do not convert text files to characters
-C: Compressed file names in files are case-sensitive
-j: Do not process compressed files in the directory path
-L: Change all file names in compressed file to lowercase
-M: Send output to more program processing
- N: Do not overwrite the original file
-o: Do not need to ask the user first, unzip overwrite the original file after execution
-P: Use the zip password option
-Q: Do not display any information
-s: Converts white space characters in file names to baseline characters
- V: Keep VMs file version information
-X: Back up the original uid/gid at the same time when decompressing

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.