Linux操做系統下怎樣解壓rar文件

rar格式的文件是在Windows操做系統中常見的壓縮格式,可是這種格式在Linux操做系統中卻不能正常解壓縮,由於Linux默認不支持這種格式,難道咱們在Linux操做系統中就不能解壓這種文件了嗎?答案只有一個,能,那麼咱們怎樣在Linux操做系統中解壓rar文件呢?ubuntu

通常經過默認安裝的ubuntu是不能解壓rar文件的,只有在安裝了rar解壓工具以後,才能夠解壓。其實在ubuntu下安裝rar解壓工具是很是簡單的,只須要兩個步驟就能夠迅速搞定。 工具

 

1、Ubuntu下rar壓縮工具、解壓工具安裝方法

以下:spa

壓縮功能 操作系統

安裝 sudo apt-get install rar .net

卸載 sudo apt-get remove rar unix

解壓功能 htm

安裝 sudo apt-get install unrar ip

卸載 sudo apt-get remove unrar rem

 2、壓縮命令、解壓命令

以下:get

ubuntu解壓命令全覽 

 

.tar 

解包:tar xvf FileName.tar 

打包:tar cvf FileName.tar DirName 

 

注:tar是打包,不是壓縮! 

 

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~ 

 

.gz 

解壓1:gunzip FileName.gz 

解壓2:gzip -d FileName.gz 

壓縮:gzip FileName 

 

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~ 

 

.tar.gz 和 .tgz 

解壓:tar zxvf FileName.tar.gz 

壓縮:tar zcvf FileName.tar.gz DirName 

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~ 

.bz2 

解壓1:bzip2 -d FileName.bz2 

解壓2:bunzip2 FileName.bz2 

壓縮: bzip2 -z FileName 

 

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~ 

 

.tar.bz2 

解壓:tar jxvf FileName.tar.bz2 

壓縮:tar jcvf FileName.tar.bz2 DirName 

 

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~  

.bz 

解壓1:bzip2 -d FileName.bz 

解壓2:bunzip2 FileName.bz 

壓縮:未知 

 

.tar.bz 

解壓:tar jxvf FileName.tar.bz 

壓縮:未知 

 

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~ 

 

.Z 

 

解壓:uncompress FileName.Z 

 

壓縮:compress FileName 

 

.tar.Z 

 

解壓:tar Zxvf FileName.tar.Z 

 

壓縮:tar Zcvf FileName.tar.Z DirName 

 

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~ 

  www.2cto.com  

.zip 

 

解壓:unzip FileName.zip 

 

壓縮:zip FileName.zip DirName 

 

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~ 

 

.rar 

 

解壓:rar x FileName.rar 

 

壓縮:rar a FileName.rar DirName 

 

rar請到:http://www.rarsoft.com/download.htm 下載! 

 

解壓後請將rar_static拷貝到/usr/bin目錄(其餘由$PATH環境變量指定的目錄也能夠): 

  www.2cto.com  

[root@www2 tmp]# cp rar_static /usr/bin/rar 

 

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~ 

 

.lha 

 

解壓:lha -e FileName.lha 

 

壓縮:lha -a FileName.lha FileName 

 

lha請到:http://www.infor.kanazawa-it.ac.jp/~ishii/lhaunix/下載! 

 

>解壓後請將lha拷貝到/usr/bin目錄(其餘由$PATH環境變量指定的目錄也能夠): 

 

[root@www2 tmp]# cp lha /usr/bin/ 

 

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~ 

  www.2cto.com  

.rpm 

 

解包:rpm2cpio FileName.rpm | cpio -div 

 

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~ 

 

.deb 

 

解包:ar p FileName.deb data.tar.gz | tar zxf - 

 

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~. 

tar .tgz .tar.gz .tar.Z .tar.bz .tar.bz2 .zip .cpio .rpm .deb .slp .arj .rar .ace .lha .lzh .lzx .lzs .arc .sda .sfx .lnx .zoo .cab .kar .cpt .pit .sit .sea 

 

解壓:sEx x FileName.* 

 

壓縮:sEx a FileName.* FileName

相關文章
相關標籤/搜索