Linux下使用unrar解壓RAR包

尛樣兒發表於2010-02-21

一.下載地址:

二.安裝:

[root@centos sybaseiq]# cat /etc/redhat-release
CentOS release 5.4 (Final)
[root@centos sybaseiq]# uname -r
2.6.18-164.el5
[root@centos sybaseiq]# rpm -ivh unrar-3.9.4-1.el5.rf.i386.rpm

三.幫助:
[root@centos lib]# unrar

UNRAR 3.90 beta 3 freeware      Copyright (c) 1993-2009 Alexander Roshal

Usage:     unrar - -
              


  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
  ai            Ignore file attributes
  ap      Set path inside archive
  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 listed 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
  to
  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 listed in specified list file
  y             Assume Yes on all queries

四.例子:

1.檢視rar包中的內容:
#unrar l *.rar
或者
#unrar v *.rar

2.測試rar包是否能解壓成功:
#unrar t *.rar

3.解壓到當前資料夾:
#unrar e *.rar

4.解壓到指定資料夾:
#unrar x *.rar /tmp

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23135684/viewspace-627342/,如需轉載,請註明出處,否則將追究法律責任。

相關文章