linux下使用解压rar文件的方法

现在长时间工作在linux下,有时会碰到rar压缩包,centos5.2没有提供相应的解压缩工具,rar的开发公司提供了一个linux下的免费命令行工具 http://rarsoft.com/rar/rarlinux-3.8.0.tar.gz
下来后直接加压,把里面的 rar 和ubrar两个文件放到 /usr/local/bin 目录下就可以直接在命令行方式下操作rar压缩包。
解压一般是

#unrar x xxx.rar

可以直接执行rar或unrar查看相关参数

# unrar

UNRAR 3.80 freeware      Copyright (c) 1993-2008 Alexander Roshal

Usage:     unrar  - -
<@listfiles...>
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
-             Stop switches scanning
ad            Append archive name to destination path
ap      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       Include only specified file
n@            Read file names to include from stdin
n@      Include files in specified list file
o[+|-]        Set the overwrite mode
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      Process files with size less than specified
sm      Process files with size more than specified
ta      Process files modified after  in YYYYMMDDHHMMSS format
tb      Process files modified before  in YYYYMMDDHHMMSS format
tn      Process files newer than
to      Process files older than
ts[N]  Save or restore file time (modification, creation, access)
u             Update files
v             List all volumes
ver[n]        File version control
vp            Pause before each volume
x       Exclude specified file
x@            Read file names to exclude from stdin
x@      Exclude files in specified list file
y             Assume Yes on all queries

Published by 阿飞 on
Tags: linux, rar

暂无评论