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

Application of zip Compression and Unzip decompression commands in Linux

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article focuses on "the application of zip compression and unzipp commands in Linux". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "the application of zip compression and unzip commands in Linux".

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

At this point, I believe you have a deeper understanding of "the application of zip compression and unzip decompression commands in Linux". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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