鹰之翔 2011-10-31
本文是“我使用过的Linux命令之unrar - 解压rar文件”的补充资料。因为今天刚好用到这个命令,特地补充一下。
将安装文件压缩包rarlinux-x.y.tar.gz解压之后,进入rar目录,执行make命令。执行文件将会安装到 /usr/local/bin 下,就可以在任何位置执行 rar 和 unrar 命令了(如果不行就确认下 /usr/local/bin 是否在环境变量 PATH 中)。
[root@liunx0918 tmp]# cd rar
[root@liunx0918rar]#ls
default.sfxlicense.txtorder.txtrar_faq.txtrar_site.txtreadme.txtrereg.txtunrar
file_id.dizMakefilerarrarfiles.lstrar.txtregister.txttechnote.txtwhatsnew.txt
[root@liunx0918rar]#catMakefile
###################################################################
#InstallingRARexecutables,configurationfilesandSFXmodules#
#toappropriatedirectories#
###################################################################
PREFIX=/usr/local
install:
cprarunrar$(PREFIX)/bin
cprarfiles.lst/etc
cpdefault.sfx$(PREFIX)/lib
[root@liunx0918rar]#make
cprarunrar/usr/local/bin
cprarfiles.lst/etc
cpdefault.sfx/usr/local/lib
[root@liunx0918rar]#unrar
UNRAR3.00freewareCopyright(c)1993-2002EugeneRoshal
Usage:unrar<command>-<switch1>-<switchN><archive><files...>
<@listfiles...><path_to_extract\>
<Commands>
eExtractfilestocurrentdirectory
l[t]Listarchive[technical]
pPrintfiletostdout
tTestarchivefiles
v[t]Verboselylistarchive[technical]
xExtractfileswithfullpath
<Switches>
-Stopswitchesscanning
adAppendarchivenametodestinationpath
ap<path>Setpathinsidearchive
av-Disableauthenticityverificationcheck
c-Disablecommentsshow
cfg-Disablereadconfiguration
clConvertnamestolowercase
cuConvertnamestouppercase
epExcludepathsfromnames
fFreshenfiles
idpDisablepercentagedisplay
ierrSendallmessagestostderr
inulDisableallmessages
kbKeepbrokenextractedfiles
o+Overwriteexistingfiles
o-Donotoverwriteexistingfiles
owSaveorrestorefileownerandgroup
p[password]Setpassword
p-Donotquerypassword
rRecursesubdirectories
ta<date>Processfilesmodifiedafter<date>inYYYYMMDDHHMMSSformat
tb<date>Processfilesmodifiedbefore<date>inYYYYMMDDHHMMSSformat
tn<time>Processfilesnewerthan<time>
to<time>Processfilesolderthan<time>
uUpdatefiles
vCreatevolumeswithsizeautodetectionorlistallvolumes
ver[n]Fileversioncontrol
vpPausebeforeeachvolume
x<file>Excludespecifiedfile
x@Readfilenamestoexcludefromstdin
x@<list>Excludefilesinspecifiedlistfile
yAssumeYesonallqueries
[root@liunx0918 rar]#