linux下解壓rar檔案
rar是一個在windows下盛行的壓縮格式,到了linux/unix環境下,卻連找個解壓縮的工具都很難找到。網上找了下,發現7zip可以用來解壓這個。順便記錄下解決過程:
1、安裝以下程式:
-rw-r--r-- 1 root root 2152153 Mar 31 10:56 p7zip_9.20.1_x86_linux_bin.tar.bz2
-rw-r--r-- 1 root root 3835235 Mar 31 10:56 p7zip_9.20.1_src_all.tar.bz2
2、分別解壓得到:
p7zip_9.20.1目錄
3、進入p7zip_9.20.1目錄,安裝:
[root@DB p7zip_9.20.1]# ./install.sh
- installing /usr/local/bin/7za
- installing /usr/local/bin/7zr
- installing /usr/local/bin/7z
- installing /usr/local/lib/p7zip/7zCon.sfx
- installing /usr/local/lib/p7zip/7z.so
- installing /usr/local/lib/p7zip/Codecs
- installing /usr/local/man/man1/7z.1
- installing /usr/local/man/man1/7za.1
- installing /usr/local/man/man1/7zr.1
- installing /usr/local/share/doc/p7zip/README
- installing /usr/local/share/doc/p7zip/ChangeLog
- installing HTML help in /usr/local/share/doc/p7zip/DOCS
總共有三類命令:7z 7zr 7za,作用:
7z uses plugins (7z.so and Codecs/Rar29.so) to handle archives.
7za is a stand-alone executable.
7za handles less archive formats than 7z.exe.
7zr is a light stand-alone executable that supports only 7z/LZMA/BCJ/BCJ2.
所以用7z來解壓,先看下命令格式:
[root@DB p7zip_9.20.1]# 7z
7-Zip 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)
Usage: 7z [...] [...]
[]
a: Add files to archive
b: Benchmark
d: Delete files from archive
e: Extract files from archive (without using directory names)
l: List contents of archive
t: Test integrity of archive
u: Update files to archive
x: eXtract files with full paths
-ai[r[-|0]]{@listfile|!wildcard}: Include archives
-ax[r[-|0]]{@listfile|!wildcard}: eXclude archives
-bd: Disable percentage indicator
-i[r[-|0]]{@listfile|!wildcard}: Include filenames
-m{Parameters}: set compression Method
-o{Directory}: set Output directory
-p{Password}: set Password
-r[-|0]: Recurse subdirectories
-scs{UTF-8 | WIN | DOS}: set charset for list files
-sfx[{name}]: Create SFX archive
-si[{name}]: read data from stdin
-slt: show technical information for l (List) command
-so: write data to stdout
-ssc[-]: set sensitive case mode
-t{Type}: Set type of archive
-u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options
-v{Size}[b|k|m|g]: Create volumes
-w[{path}]: assign Work directory. Empty path means a temporary directory
-x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames
-y: assume Yes on all queries
起先以為這麼解壓就行了:
7z -e xx.rar
但是報:
[oracle@DB ~]$ 7z -e wind_20120101.rar
Error:
Incorrect command line
奇怪,難道跟正常的格式不一樣麼?所以又回過頭去仔細學習了下命令格式。
重新再來:
[oracle@DB ~]$ 7z e -slt wind_20120101.rar
7-Zip 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_US,Utf16=on,HugeFiles=on,2 CPUs)
Processing archive: wind_20120101.rar
這下可以了。
1、安裝以下程式:
-rw-r--r-- 1 root root 2152153 Mar 31 10:56 p7zip_9.20.1_x86_linux_bin.tar.bz2
-rw-r--r-- 1 root root 3835235 Mar 31 10:56 p7zip_9.20.1_src_all.tar.bz2
2、分別解壓得到:
p7zip_9.20.1目錄
3、進入p7zip_9.20.1目錄,安裝:
[root@DB p7zip_9.20.1]# ./install.sh
- installing /usr/local/bin/7za
- installing /usr/local/bin/7zr
- installing /usr/local/bin/7z
- installing /usr/local/lib/p7zip/7zCon.sfx
- installing /usr/local/lib/p7zip/7z.so
- installing /usr/local/lib/p7zip/Codecs
- installing /usr/local/man/man1/7z.1
- installing /usr/local/man/man1/7za.1
- installing /usr/local/man/man1/7zr.1
- installing /usr/local/share/doc/p7zip/README
- installing /usr/local/share/doc/p7zip/ChangeLog
- installing HTML help in /usr/local/share/doc/p7zip/DOCS
總共有三類命令:7z 7zr 7za,作用:
7z uses plugins (7z.so and Codecs/Rar29.so) to handle archives.
7za is a stand-alone executable.
7za handles less archive formats than 7z.exe.
7zr is a light stand-alone executable that supports only 7z/LZMA/BCJ/BCJ2.
所以用7z來解壓,先看下命令格式:
[root@DB p7zip_9.20.1]# 7z
7-Zip 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)
Usage: 7z
[]
a: Add files to archive
b: Benchmark
d: Delete files from archive
e: Extract files from archive (without using directory names)
l: List contents of archive
t: Test integrity of archive
u: Update files to archive
x: eXtract files with full paths
-ai[r[-|0]]{@listfile|!wildcard}: Include archives
-ax[r[-|0]]{@listfile|!wildcard}: eXclude archives
-bd: Disable percentage indicator
-i[r[-|0]]{@listfile|!wildcard}: Include filenames
-m{Parameters}: set compression Method
-o{Directory}: set Output directory
-p{Password}: set Password
-r[-|0]: Recurse subdirectories
-scs{UTF-8 | WIN | DOS}: set charset for list files
-sfx[{name}]: Create SFX archive
-si[{name}]: read data from stdin
-slt: show technical information for l (List) command
-so: write data to stdout
-ssc[-]: set sensitive case mode
-t{Type}: Set type of archive
-u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options
-v{Size}[b|k|m|g]: Create volumes
-w[{path}]: assign Work directory. Empty path means a temporary directory
-x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames
-y: assume Yes on all queries
起先以為這麼解壓就行了:
7z -e xx.rar
但是報:
[oracle@DB ~]$ 7z -e wind_20120101.rar
Error:
Incorrect command line
奇怪,難道跟正常的格式不一樣麼?所以又回過頭去仔細學習了下命令格式。
重新再來:
[oracle@DB ~]$ 7z e -slt wind_20120101.rar
7-Zip 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_US,Utf16=on,HugeFiles=on,2 CPUs)
Processing archive: wind_20120101.rar
這下可以了。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12932950/viewspace-720028/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Linux 系統下解壓 rar 檔案Linux
- linux 下面壓縮、解壓.rar檔案Linux
- ubuntu下如何解壓rar檔案Ubuntu
- linux 解壓rar,zipLinux
- 【Python】Python實現解壓rar檔案Python
- Linux下檔案的壓縮與解壓Linux
- rar是什麼格式 電腦上rar檔案怎麼解壓
- rar檔案怎麼開啟win10_win10開啟解壓rar檔案方法Win10
- nodejs解壓zip/rar檔案到本地,並獲取到解壓進度NodeJS
- java解壓rar,解壓zipJava
- 新手教程:如何在 Linux 下解壓 Zip 檔案Linux
- 壓縮檔案格式rar和zip有什麼區別 壓縮檔案格式rar和zip哪個好
- linux下oracle安裝檔案.cpio.gz檔案的解壓LinuxOracle
- win10系統rar拖拽解壓報錯怎麼辦_win10檔案rar拖拽解壓出錯解決方法Win10
- window下解壓zip和rar檔案以及copy獲取時間段內資料
- 自己寫的一個 java 解壓 rar zip 帶密碼 檔案Java密碼
- Linux下對於檔案或者目錄的打包及壓縮、解壓Linux
- linux系統壓縮,解壓檔案筆記Linux筆記
- linux下解壓部分zip檔案存在亂碼解決辦法Linux
- rar壓縮解壓工具:RAR Extractor - ZIP Unarchiver中文啟用版Hive
- Keka for Mac RAR解壓工具Mac
- Linux中Bin檔案壓縮包解壓執行Linux
- 壓縮檔案格式rar和zip有什麼區別 zip和rar哪個是無失真壓縮
- Linux 檔案壓縮Linux
- Linux 解壓zip檔案詳解之unzip命令!Linux
- windows cmd拉取linux資料夾下的檔案,並解壓WindowsLinux
- linux檔案壓縮和解壓命令Linux
- Java解壓rar5相容rar4Java
- Linux常用的檔案解壓命令有哪些?Linux
- 雲伺服器:解決linux下zip檔案解壓亂碼問題伺服器Linux
- .NET 壓縮/解壓檔案
- Linux科研武器庫 - 檔案壓縮與解壓縮 - zip / unzipLinux
- linux 下的解壓Linux
- betterzip怎麼解壓檔案?如何使用BetterZip批次解壓壓縮檔案
- Mac解壓軟體:RAR Extractor for macMac
- RAR Extractor Mac - 解壓縮軟體Mac
- 解壓縮軟體RAR Extractor MacMac
- Linux解壓檔案到指定目錄的方法Linux
- Linux常用命令之檔案壓縮與解壓縮命令詳解Linux