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包(轉)Linux
- Linux下使用unrar解壓RAR包Linux
- linux 解壓rar,zipLinux
- linux 之rar解壓Linux
- rar是什麼格式 電腦上rar檔案怎麼解壓
- 【Python】Python實現解壓rar檔案Python
- rar檔案怎麼開啟win10_win10開啟解壓rar檔案方法Win10
- Linux下檔案的壓縮與解壓Linux
- linux下解壓.gz檔案、.cpio檔案、zip檔案Linux
- nodejs解壓zip/rar檔案到本地,並獲取到解壓進度NodeJS
- java解壓rar,解壓zipJava
- linux下檔案打包、壓縮詳解Linux
- 壓縮檔案格式rar和zip有什麼區別 壓縮檔案格式rar和zip哪個好
- linux下.cpio.gz檔案的解壓Linux
- 用C#實現RAR檔案的自動解壓縮C#
- win10系統rar拖拽解壓報錯怎麼辦_win10檔案rar拖拽解壓出錯解決方法Win10
- Linux命令列下載檔案和安裝RARLinux命令列
- window下解壓zip和rar檔案以及copy獲取時間段內資料
- 自己寫的一個 java 解壓 rar zip 帶密碼 檔案Java密碼
- 新手教程:如何在 Linux 下解壓 Zip 檔案Linux
- Linux下*.tar.gz檔案解壓縮命令Linux
- Linux下檔案的壓縮與打包詳解Linux
- linux下oracle安裝檔案.cpio.gz檔案的解壓LinuxOracle
- 【轉】如何把壓縮檔案變成圖片檔案,圖片字尾改成rar就可以解壓
- Linux下.tar.xz檔案的解壓方法詳解Linux
- linux下.tar.gz和.gz檔案解壓詳解Linux
- rar壓縮解壓工具:RAR Extractor - ZIP Unarchiver中文啟用版Hive
- Keka for Mac RAR解壓工具Mac
- Linux下常見檔案格式的壓縮、解壓小結(轉)Linux
- linux下 tar解壓 gz解壓 bz2等各種解壓檔案使用方法Linux
- linux下zip檔案解壓亂碼的問題Linux
- aix下解壓縮cpio檔案AI
- Unix 下批量解壓zip檔案
- linux下的檔案的壓縮和解壓縮Linux
- linux下 tar解壓 gz解壓 bz2等各種解壓檔案使用方法 2Linux