Linux的壓縮和解壓縮的方法總結(jié)
更新時間:2017年08月30日 10:56:43 作者:cakin24
這篇文章主要介紹了Linux的壓縮和解壓縮的方法總結(jié)的相關資料,通過本文希望大家能掌握Linux 壓縮和解壓縮的知識,需要的朋友可以參考下
Linux的壓縮和解壓縮的方法總結(jié)
一 常用的壓縮格式
- .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ū)交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!
相關文章
VMware 12 下 Ubuntu 16.04 安裝圖文教程
這篇文章主要為大家詳細介紹了VMware 12 下 Ubuntu 16.04 安裝圖文教程,具有一定的參考價值,感興趣的小伙伴們可以參考一下2019-06-06
Linux解決RocketMQ中NameServer啟動問題的方法詳解
這篇文章主要為大家詳細介紹了Linux解決RocketMQ中NameServer啟動問題的方法,文中通過圖片和示例代碼進行了詳細講解,需要的小伙伴可以參考下2023-08-08

