Linux的壓縮和解壓縮的方法總結(jié)
Linux的壓縮和解壓縮的方法總結(jié)
一 常用的壓縮格式
- .zip
- .gz
- .bz2
- .tar.gz
- .tar.bz2
二 .zip格式壓縮
1、語法
zip 壓縮文件名 源文件名
壓縮文件
zip -r 壓縮文件名 源目錄
壓縮目錄
unzip 壓縮文件
解壓縮.zip文件
2、說明
.zip的格式在windows和LInux是通用的。
3、實(shí)戰(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 壓縮和解壓縮的實(shí)例詳解,如有疑問請(qǐng)留言或者到本站社區(qū)交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對(duì)本站的支持!
相關(guān)文章
ubuntu開機(jī)后使用使用終端運(yùn)行應(yīng)用程序的設(shè)置方法
這篇文章主要給大家介紹了關(guān)于ubuntu開機(jī)后使用使用終端運(yùn)行應(yīng)用程序的設(shè)置方法,文中通過圖文介紹的非常詳細(xì),對(duì)大家學(xué)習(xí)或者使用Mubuntu具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來一起學(xué)習(xí)學(xué)習(xí)吧2019-09-09
Linux定時(shí)任務(wù)Crontab詳解(推薦)
本篇文章主要介紹了Linux定時(shí)任務(wù)Crontab詳解,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下。2016-12-12
Xshell遠(yuǎn)程連接linux詳細(xì)步驟(小白必備)
本文主要介紹了Xshell遠(yuǎn)程連接linux詳細(xì)步驟,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2022-08-08
VMware 12 下 Ubuntu 16.04 安裝圖文教程
這篇文章主要為大家詳細(xì)介紹了VMware 12 下 Ubuntu 16.04 安裝圖文教程,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2019-06-06
linux定時(shí)任務(wù)訪問url實(shí)例
本篇文章主要介紹了linux定時(shí)任務(wù)訪問url實(shí)例,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2017-06-06
Linux解決RocketMQ中NameServer啟動(dòng)問題的方法詳解
這篇文章主要為大家詳細(xì)介紹了Linux解決RocketMQ中NameServer啟動(dòng)問題的方法,文中通過圖片和示例代碼進(jìn)行了詳細(xì)講解,需要的小伙伴可以參考下2023-08-08

