In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "the example usage of zip compression and decompression command in Linux". In daily operation, I believe that many people have doubts about the usage of zip compression and decompression command examples in Linux. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "zip compression and decompression command instance usage in Linux". Next, please follow the editor to study!
1. Compress ordinary files
Format: zip archive name source file
Ls#bk Common desktop.ini develop my little movie .txtzip nothing to see .zip my little movie .txt # adding: my little movie .txt (deflated 27%) ls#bk Common desktop.ini develop my little movie .txt nothing to see .zip
Summary: commands in the format of zip zip package name source file retain the source file's
2. Compress the directory
Format: zip-r compressed package name source directory
Pwd#/mnt/c/Users/bingobugbow/Desktop/ I am the directory cd.. ls#bk Common desktop.ini develop I am the directory zip-r directory. Zip I am the directory / # adding: I am the directory / (stored 0%) # adding: I am the directory / my little movie .txt (deflated 27%) # adding: I am the directory / nothing to see .zip (stored 0%) ls#bk Common desktop.ini develop I am the directory .zip
Summary: the source directory is also retained
3. Decompress ordinary files
Format: unzip package
Ls# nothing to see .zipunzip nothing to see .zip # Archive: nothing to look at .zip # inflating: my little movie .txtls # my little movie .txt nothing to see .zip
Conclusion: when decompressing, the original compressed package will also exist, which is equivalent to taking out the contents of the compressed package.
4. Decompress the directory
Format: unzip package
Ls#bk Common desktop.ini develop directory .zipunzip directory .zip # Archive: directory .zip # creating: I am directory / # inflating: I am directory / my little movie .txt # extracting: I am directory / nothing look .zipls # bk Common desktop.ini develop I am directory .zip
Summary: as with the unzipped files, the source package will be retained
Zip decompression and compression in this case without any parameters (- r, and when decompression, the directory does not need to add-r) parameters are excluded. Will keep the source file. The source file here refers to the source compressed file and the compressed package that has been compressed.
At this point, the study on the "zip compression and decompression command instance usage in Linux" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.