Linux zip compression and unzip decompression usage detailed

Source: Internet
Author: User
Tags zip

Generally speaking, zip is more general, whether under Windows or Linux, zip can be easily compressed and decompression.
Here are two more commonly used compression commands and decompression commands.

Compress

Zip Mypackge.zip-r/var/test/

Compresses all files in the/var/test/directory, including subfolders and files, into Mypackge.zip

-R represents a recursive subdirectory


Decompression

Unzip mypackge.zip-d/var/test2/

Extract the Mypackge.zip into the/var/test2/directory

If not specified, the default is extracted directly to the current directory, such as unzip Mypackge.zip

-D to specify which directory to extract

Main parameters

-C: The result of the decompression
-L: Displays files contained within a 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, but in addition to updating an existing file, the other files in the compressed file are extracted into the directory
-V: Display detailed information when execution is performed
-Z: Only notes text for compressed files is displayed
-A: Make necessary character conversions to text files
-B: Do not convert text files to characters
-C: File names in compressed files are case-sensitive
-J: Do not process compressed files in the existing directory path
-L: Change all file names in compressed file to lowercase
-M: Send output to more program processing
-N: Do not overwrite existing files when extracting
-O: Do not need to ask the user first, unzip overwrite the original file after execution
-P: Password option with zip
-Q: Do not display any information at execution time
-S: Converts whitespace characters in file names to bottom line characters
-V: Keep VMS file version information
-X: Back up the file at the same time when extracting the original Uid/gid

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.