Linux的壓縮和解壓縮的方法總結
更新時間:2017年08月30日 10:56:43 作者:cakin24
這篇文章主要介紹了Linux的壓縮和解壓縮的方法總結的相關資料,通過本文希望大家能掌握Linux 壓縮和解壓縮的知識,需要的朋友可以參考下
Linux的壓縮和解壓縮的方法總結
一 常用的壓縮格式
- .zip
- .gz
- .bz2
- .tar.gz
- .tar.bz2
二 .zip格式壓縮
1、語法
zip 壓縮文件名 源文件名
壓縮文件
zip -r 壓縮文件名 源目錄
壓縮目錄
unzip 壓縮文件
解壓縮.zip文件
2、說明
.zip的格式在windows和LInux是通用的。
3、實戰(zhàn)
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 壓縮和解壓縮的實例詳解,如有疑問請留言或者到本站社區(qū)交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!
相關文章
Linux查看系統(tǒng)文件打開數(shù)的方法小結
有許多情況下,我們需要查看一個進程當前打開了哪些文件,反過來我們也希望知道某一個文件正在被哪些進程所讀寫,在Linux下有許多有用的工具可以幫我們完成這兩個工作,本文給大家介紹了Linux查看系統(tǒng)文件打開數(shù)的方法小結,需要的朋友可以參考下2024-07-07
使用VSCode的Remote-SSH連接Linux進行遠程開發(fā)
這篇文章主要介紹了使用VSCode的Remote-SSH連接Linux進行遠程開發(fā),文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2020-08-08
linux如何mount掛載磁盤并設置開機自動mount的實現(xiàn)
這篇文章主要介紹了linux如何mount掛載磁盤并設置開機自動mount的實現(xiàn),文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2019-09-09

