One Linux command per day: A detailed description of the ZIP compression and unzip decompression commands in Linux

Source: Internet
Author: User

Article turned from: http://www.jb51.net/LINUXjishu/105916.html

1. Compress the MyData directory below the/home directory to Mydata.zip
Zip-r Mydata.zip MyData #压缩mydata目录
2. Unzip the mydata.zip under the/home directory into the Mydatabak directory
Unzip mydata.zip-d Mydatabak
3, the home/home directory below the ABC folder and 123.txt compression becomes abc123.zip
Zip-r abc123.zip ABC 123.txt
4. Extract the Wwwroot.zip from the/home directory directly into the/home directory
Unzip Wwwroot.zip
5, the Home/home directory under the Abc12.zip, Abc23.zip, abc34.zip simultaneously extracted to the/home directory
Unzip Abc\*.zip
6. View the contents of the wwwroot.zip inside the/home directory
Unzip-v Wwwroot.zip
7. Verify that the wwwroot.zip under the/home directory is complete
Unzip-t Wwwroot.zip
8. Unzip all the files inside the/home directory under Wwwroot.zip to the first level directory
Unzip-j Wwwroot.zip

Main parameters

-C: Results that will be decompressed
-L: Displays files contained within the compressed file
-P: Similar to the-c parameter, the extracted results are displayed on the screen, but no conversions are performed
-T: Check that the compressed file is correct
-U: Similar to the-f parameter, but other files in the compressed file are extracted to the directory in addition to updating the existing file
-V: Show detailed information when performing Yes
-Z: Show only notes text for compressed files
-A: Necessary character conversions for text files
-B: Do not convert text files to characters
-C: File names in compressed files are case-sensitive
-j: does not handle the directory path of compressed files
-L: Change all file names in the compressed file to lowercase
-M: Send output to more program processing
-N: Do not overwrite the original file when decompressing
-O: Do not ask the user first, overwrite the original file after unzip execution
-P: Password option with zip
-Q: Do not display any information when executing
-S: Converts white space characters in file names to baseline characters
-V: Keep the file version information of the VMS
-X: Uid/gid The original file while decompressing

Here's what I met:

Extract the 1,zip files to the development directory

Unzip-n nerdtree.zip-d Nerdtree

2. View the contents of the zip file

One Linux command per day: A detailed description of the ZIP compression and unzip decompression commands in Linux

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.