Zip compression and Unzip decompression

Source: Internet
Author: User

Zip can compress files, or you can compress directories. The compression extension is. zip.

Syntax: zip[option [compressed filename. zip][file directory name to compress]

Common options:

-R: Compresses the directory along with all subdirectories and files in the directory.

[[email protected] ~]# zip-r 111.zip 111 adding:111/(stored 0) adding:111/1.txt.gz (stored 0) [[email protected] ~] # ls111 111.txt 1.txt 222.txt anaconda-ks.cfg install.log.syslog test11111.txt 111.zip 222 333 Insta Ll.log Shell

You can see that the original file did not disappear after compression.

You can see multiple directories compressed in a single compressed file:

Example: Zip-r test.zip 111 222//Compress directories 111 and 222 to Test.zip.

-M: Delete the original file after compression.

Unzip decompression:

Unzip *.zip

Unzip test.zip-d/tmp/

Unzip the file to the specified directory.

Zip compression and Unzip decompression

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.