Linux中如何實現(xiàn)壓縮和解壓縮-創(chuàng)新互聯(lián)

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

成都創(chuàng)新互聯(lián)自2013年起,先為吉利等服務(wù)建站,吉利等地企業(yè),進(jìn)行企業(yè)商務(wù)咨詢服務(wù)。為吉利企業(yè)網(wǎng)站制作PC+手機+微官網(wǎng)三網(wǎng)同步一站式服務(wù)解決您的所有建站問題。

一 常用的壓縮格式

  • .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中如何實現(xiàn)壓縮和解壓縮”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!

本文題目:Linux中如何實現(xiàn)壓縮和解壓縮-創(chuàng)新互聯(lián)
文章位置:http://www.muchs.cn/article42/hgdhc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站排名、電子商務(wù)App設(shè)計、網(wǎng)站改版動態(tài)網(wǎng)站、服務(wù)器托管

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都定制網(wǎng)站建設(shè)