A detailed description of the use of UNZIP commands under Linux

Source: Internet
Author: User

1. Function: Unzip zip file

2. Location:/usr/bin/unzip

3. Format usage:unzip [-z] [-opts[modifiers]] file[.zip] [list] [-X xlist] [-D Exdir]

4. Main parameters

    • -C Display the extracted results to the screen and convert the characters appropriately
    • -P, similar to the-c parameter, displays the results of the decompression to the screen, but does not perform any conversions.
    • -l display files contained within a compressed file
    • -F Updating an existing file
    • -T checks if the compressed file is correct, but does not
    • -U is similar to the-f parameter, but in addition to updating existing files, other files in the compressed file are extracted to the directory
    • -Z Show only notes text for compressed files
    • -V performs yes when the detailed information is displayed. or view the compressed files directory, but do not press
    • -T sets the latest change time for all files in the compressed file to the time of decompression
    • -x specifies that you do not process which files in the. zip archive
    • -d Specifies the directory to be stored after the file has been decompressed
    • -N Do not overwrite the original file when extracting
    • -Q Quiet mode, does not display any information when executing
    • -O do not need to ask the user first, unzip overwrite the original file after execution
    • -A necessary character conversion for a text file
    • -J does not handle directory paths in compressed files
    • -AA all file directories as text processing
    • -U use escapes for all Non-ascii Unicode
    • -uu ignoring Unicode encoded characters
    • The file names in the-C compressed file are case-sensitive
    • -L Change all the file names in the compressed file to lowercase
    • -X unzip while back to file the original Uid/gid
    • -V Keep the file version information of the VMS
    • -K reserved file's Setuid/setgid/tacky property
    • -M sends output results to more program processing
    • -o Specifies character encoding dos,windows and OS/2
    • -i specifies character encoding for UNIX

5. Application examples
1. Extract the files into the current directory

Unzip Test.zip

2, if you want to extract the files to the specified directory, you need to use the-D parameter.

unzip-d/temp Test.zip

3, decompression, sometimes do not want to overwrite the existing files, then you can add-n parameter

Unzip-n test.zipunzip-n-d/temp Test.zip

4. Just look at what files are included in the ZIP archive and do not unzip

Unzip-l Test.zip

5. View the list of displayed files also contains the compression ratio

Unzip-v Test.zip

6. Check if the zip file is damaged

Unzip-t Test.zip

7, the compressed file Test.zip in the specified directory TMP decompression, if the same file exists, requires the unzip command overwrite the original file

Unzip-o test.zip-d/tmp/

A detailed description of the use of UNZIP commands under Linux

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.