Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the command to extract the zip file in linux

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article is to share with you about what is the command to extract zip files in linux. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

The linux zip file extraction commands are: 1, compress the mydata directory [zip-r mydata.zip mydata]; 2, extract mydata [unzip mydata.zip-d mydatabak]; 3, extract to the home directory [unzip..].

The following commands are used to extract linux zip files:

1. Compress the mydata directory under the / home directory to mydata.zip

Zip-r mydata.zip mydata # compress mydata directory

2. Extract the mydata.zip under the / home directory into the mydatabak directory

Unzip mydata.zip-d mydatabak

3. Compress the abc folder and 123.txt under the / home directory into abc123.zip

Zip-r abc123.zip abc 123.txt

4. Extract the wwwroot.zip under the / home directory directly into the / home directory

Unzip wwwroot.zip

5. Extract the abc12.zip, abc23.zip and abc34.zip under the / home directory into the / home directory at the same time.

Unzip abc*.zip

6. Check the contents of wwwroot.zip under the / home directory

Unzip-v wwwroot.zip

7. Verify that the wwwroot.zip under the / home directory is complete

Unzip-t wwwroot.zip

8. Extract all the files in wwwroot.zip under the / home directory to the first level directory.

Unzip-j wwwroot.zip

Main parameters

-c: the result of decompression

-l: displays the files contained in the compressed file

-p: similar to the-c parameter, the decompressed result is displayed on the screen, but no conversion is performed

-t: check whether the compressed file is correct

-u: similar to the-f parameter, but in addition to updating existing files, other files in the compressed file are also unzipped to the directory

-v: displays detailed information when executing yes

-z: only the remarks text of the compressed file is displayed

-a: perform the necessary character conversion for text files

-b: do not convert characters to text files

-C: file names in compressed files are case sensitive

-j: the original directory path in the compressed file is not processed

-L: change all file names in the compressed file to lowercase

-M: send the output to the more program for processing

-n: do not overwrite the original file when decompressing

-o: there is no need to ask the user first. The original file is overwritten after unzip execution.

-P: password option for using zip

-Q: no information is displayed during execution

-s: converts white space characters in file names to underline characters

-V: keep the file version information of VMS

-X: save the original UID/GID of the file when unzipping

Thank you for reading! On the linux zip file decompression command is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report