gp_scorpius

学习,记录,探讨,成长

linux解压rar格式文件

1.查看linux版本

$  cat /etc/redhat-release

CentOS release 6.4 (Final)

$uname -r

2.6.32-358.el6.i686

2.下载对应的unrar安装包

下载地址:http://www.rpmfind.net/linux/rpm2html/search.php?query=unrar

使用el6.i686在页面查找对应的版本.

3.安装unrar程序

$ sudo rpm -ivh unrar-5.0.3-1.el6.rf.i686.rpm

warning: unrar-5.0.3-1.el6.rf.i686.rpm: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY
Preparing...                ########################################### [100%]
   1:unrar                  ########################################### [100%]

4.使用unrar命令

$ unrar --help

UNRAR 5.00 beta 3 freeware      Copyright (c) 1993-2013 Alexander Roshal

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

<Commands>
  e             Extract files without archived paths
  l[t[a],b]     List archive contents [technical[all], bare]
  p             Print file to stdout
  t             Test archive files
  v[t[a],b]     Verbosely list archive contents [technical[all],bare]
  x             Extract files with full path

<Switches>
  -             Stop switches scanning
  @[+]          Disable [enable] file lists
  ad            Append archive name to destination path
  ag[format]    Generate archive name using the current date
  ai            Ignore file attributes
  ap<path>      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<file>       Additionally filter included files
  n@            Read additional filter masks from stdin
  n@<list>      Read additional filter masks from 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<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>[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<file>       Exclude specified file
  x@            Read file names to exclude from stdin
  x@<list>      Exclude files listed in specified list file
  y             Assume Yes on all queries


5.解压文件

$unrar x *.rar

阅读更多
版权声明:本文为gp_scorpius原创文章,未经允许不得转载。 https://blog.csdn.net/gp_scoprius/article/details/53995321
文章标签: linux unrar rar
个人分类: 开发工具
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

linux解压rar格式文件

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭