1. 程式人生 > >Linux解壓rar文件

Linux解壓rar文件

cte 之前 unrar cal mod 目錄 都在 掃描 stop

Linux解壓rar文件(unrar安裝和使用,分卷解壓)

windows平臺很多壓縮文檔為rar文件,那麽怎麽做到Linux解壓rar文件(unrar安裝和使用)?

簡單,centos5安裝unrar即可。 unrar安裝方法如下:

wget http://dag.wieers.com/rpm/packages/unrar/unrar-3.6.8-1.el5.rf.i386.rpm;rpm -Uvh unrar-3.6.8-1.el5.rf.i386.rpm;

復制上面的命令,在root下執行即可。

基本unrar用法unrar x -o- -y CTOHome.com.rar /home/www.CTOHome.com/

(把CTOHome.com.rar文件,解壓到/home/www.CTOHome.com目錄。要註意解壓目錄必須以 / 結束)

unrar分卷解壓: 假設第一個分卷的文件名CTOHome.r00,所有分卷都在同一個目錄。
那麽就直接 unrar x -o- -y CTOHome.r00 /home/www.CTOHome.com/

其他操作系統的unrar下載: http://dag.wieers.com/rpm/packages/unrar/

unrar使用幫助

用法: unrar <命令> -<開關 1> -<開關 N> <壓縮文件> <文件...>
<@列表文件...> <解壓路徑\>

<註釋>
e 解壓壓縮文件到當前目錄
l[t,b] 列出壓縮文件[技術信息,簡潔]
p 打印文件到標準輸出設備
t 測試壓縮文件
v[t,b] 詳細列出壓縮文件[技術信息,簡潔]
x 用絕對路徑解壓文件

<開關>
- 停止掃描
ac 壓縮或解壓後清除存檔屬性
ad 添加壓縮文件名到目標路徑
ap<路徑> 添加路徑到壓縮文件中
av- 禁用用戶身份校驗
c- 禁用註釋顯示
cfg- 禁用讀取配置
cl 名稱轉換為小寫
cu 名稱轉換為大寫
dh 打開共享文件
ep 從名稱中排除路徑
ep3 擴展路徑為包含盤符的完全路徑
f 刷新文件
id[c,d,p,q] 禁止信息顯示
ierr 發送所有消息到標準錯誤設備
inul 禁用所有消息
ioff 完成一個操作後關閉 PC 電源
kb 保留損壞的已解壓文件
n<文件> 僅包括指定文件
[email protected] 從標準輸入設備讀取要包括的文件名稱
[email protected]<列表> 在指定列表文件包括文件
o+ 覆蓋已存在文件
o- 不覆蓋已存在文件
oc 設置 NTFS 壓縮屬性
or 自動重命名文件
ow 保存或恢復文件所有權和組
[密碼] 設置密碼
p- 不詢問密碼
r 包含子目錄
ri<P>[:<S>] 設置優先級 (0-默認,1-最小..15-最大) 和休眠時間(毫秒)
sl<大小> 處理小於指定大小的文件
sm<大小> 處理大於指定大小的文件
ta<日期> 添加日期 <日期> 後修改的文件,日期格式 YYYYMMDDHHMMSS
tb<日期> 添加日期 <日期> 前修改的文件,日期格式 YYYYMMDDHHMMSS
tn<時間> 添加 <時間> 以後的文件
to<時間> 添加 <時間> 以前的文件
ts<m,c,a>[N] 保存或恢復文件時間(修改,創建,訪問)
u 更新文件
v 列出所有卷
ver[n] 文件版本控制
vp 每卷之前暫停
x<文件> 排除指定的文件
[email protected] 從標準輸入設備讀取要排除的文件名
[email protected]<列表> 排除指定列表文件中的文件
y 假設對全部詢問都回答是



UNRAR 3.60 freeware Copyright (c) 1993-2006 Alexander Roshal

Usage: unrar <command> -<switch 1> -<switch N> <archive> <files...>
<@listfiles...> <path_to_extract\>

<Commands>
e Extract files to current directory
l[t,b] List archive [technical, bare]
p Print file to stdout
t Test archive files
v[t,b] Verbosely list archive [technical,bare]
x Extract files with full path

<Switches>
- Stop switches scanning
ad Append archive name to destination path
ap<path> Set path inside archive
av- Disable authenticity verification check
c- Disable comments show
cfg- Disable read configuration
cl Convert names to lower case
cu Convert names to upper case
dh Open shared files
ep Exclude paths from names
ep3 Expand paths to full including the drive letter
f Freshen files
id[c,d,p,q] Disable messages
ierr Send all messages to stderr
inul Disable all messages
kb Keep broken extracted files
n<file> Include only specified file
[email protected] Read file names to include from stdin
[email protected]<list> Include files in specified list file
o+ Overwrite existing files
o- Do not overwrite existing files
or Rename files automatically
ow Save or restore file owner and group
p[password] Set password
p- Do not query password
r Recurse subdirectories
sl<size> Process files with size less than specified
sm<size> Process files with size more than specified
ta<date> Process files modified after <date> in YYYYMMDDHHMMSS format
tb<date> Process files modified before <date> in YYYYMMDDHHMMSS format
tn<time> Process files newer than <time>
to<time> Process files older than <time>
ts<m,c,a>

Linux解壓rar文件