歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux命令 >> Linux下常用的一些解壓縮命令匯總

Linux下常用的一些解壓縮命令匯總

日期:2017/2/28 9:57:14   编辑:Linux命令
Linux命令

工作中經常碰到對以下文件的解壓, .tar,.gz......舉了些例子和參數,到時候直接就可以套用。

1、test.tar //-->tar -xzvf test.tar
2、test.tar.gz //-->gzip -d test.tar.gz 或者 gunzip test.tar.gz
3、test.tgz //-->tar -xzf test.tgz
4、test.bz2 //-->bzip2 -d test.bz2 或者 bunzip2 test.bz2
5、test.tar.bz2 //-->tar -xjf test.tar.bz2
6、test.Z //-->uncompress test.Z
7、test.tar.Z //-->tar -xZf test.tar.Z
8、test.rar //-->unrar e test.rar
9、test.zip //-->unzip test.zip

總結下:
1. 帶.tar,都可以用 tar來解壓
2. rar,zip文件,分別用unrar,unzip來解壓,也比較好記。

常用參數格式:
-x: 是解壓
-v: 是復雜輸出,顯示所有過程
-f: 是指定文件
-z: 是gz格式

其他參數:
-c: 建立壓縮檔案
-t:查看內容
-r 向壓縮歸檔文件末尾追加文件
-u:更新原壓縮包中的文件
-j:有bz2屬性的
-Z:有compress屬性的
-O:將文件解開到標准輸出

Copyright © Linux教程網 All Rights Reserved