新整理出的linux/solrais下面的檔案解壓縮命令!

來源:互聯網
上載者:User

新整理出的linux/solrais下面的檔案解壓縮命令
日期:2004/07/30  作者:zcatlinux  來源:zclinux

檔案打包和解壓縮包:
1. linux下打包解包:
 tar  cvf   *.tar    *.*(原檔案)      ――打包
 tar  zcvf  *.tar.gz  *.*(原檔案) ――壓縮
 tar  xvf   *.tar ――解包
 tar  zxvf  *.tar.gz ――解壓縮
  
solaris下打包解壓縮:
compress /mnt/lgx/a1.doc      -------a1.doc.Z
uncompress /mnt/lgx/a1.doc.Z
-r 遞迴操作,如果指定目錄變元,則壓縮該目錄及其子目錄中的所有檔案。
-c 將壓縮資料返回標準輸出,而預設情況下為壓縮檔時將壓縮資料返迴文件。
-v 顯示每個檔案夾的壓縮百分比

 gzip -v /mnt/lgx/a1.doc               --------a1.doc.gz
 gunzip /mnt/lgx/a1.doc.gz
-c 壓縮結果寫入標準輸出,原檔案保持不變。預設時gzip將原檔案壓縮為.gz檔案,並刪除原檔案。
-v 輸出處理資訊。
-d 解壓縮指定檔案。
-t 測試壓縮檔的完整性

2.以.z為副檔名的檔案:
#uncompress file.Z

3.以.gz為副檔名的檔案:
#gunzip file.gz

4.以.bz2為副檔名的檔案:
#bunzip2 file.bz2

5.以.tar.Z為副檔名的檔案:
#tar xvZf file.tar.Z  
或 #compress -dc file.tar.Z | tar xvf -

6.以.tar.gz/.tgz為副檔名的檔案:
#tar xvzf file.tar.gz  
或 gzip -dc file.tar.gz | tar xvf -

7.以.tar.bz2為副檔名的檔案:
#tar xvIf file.tar.bz2  
或 bzip2 -dc file.tar.bz2 | xvf -

8.以.cpio.gz/.cgz為副檔名的檔案:
#gzip -dc file.cgz | cpio –div

9.以.cpio/cpio為副檔名的檔案:
#cpio -div file.cpio  
或cpio -divc file.cpio

10.以.rpm為副檔名的檔案安裝:
#rpm -i file.rpm

11.以.rpm為副檔名的檔案解壓縮:
#rpm2cpio file.rpm | cpio -div

12.以.deb為副檔名的檔案安裝:
#dpkg -i file.deb

13.以.deb為副檔名的檔案解壓縮:
#dpkg-deb --fsys-tarfile file.deb | tar xvf - ar p  
file.deb data.tar.gz | tar xvzf -

14.以.zip為副檔名的檔案:
#unzip file.zip

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.