溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Linux中如何實現壓縮和解壓縮

發布時間:2021-07-16 13:39:48 來源:億速云 閱讀:173 作者:小新 欄目:服務器

這篇文章主要介紹Linux中如何實現壓縮和解壓縮,文中介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們一定要看完!

一 常用的壓縮格式

  • .zip

  • .gz

  • .bz2

  • .tar.gz

  • .tar.bz2

 二 .zip格式壓縮

1、語法

zip 壓縮文件名 源文件名

壓縮文件

zip -r 壓縮文件名 源目錄

壓縮目錄

unzip 壓縮文件

解壓縮.zip文件

2、說明

.zip的格式在windows和LInux是通用的。

3、實戰

root@localhost test]# ls
abc cdf
[root@localhost test]# zip abc.zip abc
adding: abc (stored 0%)
[root@localhost test]# mkdir dirtst
[root@localhost test]# touch ./dirtst/ert
[root@localhost test]# zip -r dirtst.zip dirtst
adding: dirtst/ (stored 0%)
adding: dirtst/ert (stored 0%)
[root@localhost test]# ls
abc abc.zip cdf dirtst dirtst.zip
[root@localhost test]# rm -fr abc
[root@localhost test]# ls
abc.zip cdf dirtst dirtst.zip
[root@localhost test]# unzip abc.zip
Archive: abc.zip
extracting: abc
[root@localhost test]# ls
abc abc.zip cdf dirtst dirtst.zip
[root@localhost test]# rm -rf dirtst
[root@localhost test]# unzip dirtst.zip
Archive: dirtst.zip
creating: dirtst/
extracting: dirtst/ert
[root@localhost test]# ls
abc abc.zip cdf dirtst dirtst.zip

以上是“Linux中如何實現壓縮和解壓縮”這篇文章的所有內容,感謝各位的閱讀!希望分享的內容對大家有幫助,更多相關知識,歡迎關注億速云行業資訊頻道!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女