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<文件>       仅包括指定文件
  n@            从标准输入设备读取要包括的文件名称
  n@<列表>      在指定列表文件包括文件
  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<文件>       排除指定的文件
  x@            从标准输入设备读取要排除的文件名
  x@<列表>      排除指定列表文件中的文件
  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
  n@            Read file names to include from stdin
  n@<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>


本文转自茄子_2008博客园博客,原文链接:http://www.cnblogs.com/xd502djj/archive/2011/03/25/1995331.html,如需转载请自行联系原作者。


目录
相关文章
|
4天前
|
Linux 开发工具 C语言
Linux 安装 gcc 编译运行 C程序
Linux 安装 gcc 编译运行 C程序
22 0
|
4天前
|
Ubuntu Linux Python
Linux(15)Ubuntu安装ninja构建工具
Linux(15)Ubuntu安装ninja构建工具
15 0
|
7天前
|
NoSQL Linux 测试技术
Redis的安装(Linux版)
Redis的安装(Linux版)
149 1
|
1天前
|
关系型数据库 MySQL Java
Linux 安装 JDK、MySQL、Tomcat(图文并茂)
Linux 安装 JDK、MySQL、Tomcat(图文并茂)
12 2
|
1天前
|
人工智能 Linux
Linux查找大文件的方法
Linux查找大文件的方法
|
1天前
|
负载均衡 Java 应用服务中间件
nginx安装在linux上
nginx安装在linux上
21 2
|
2天前
|
监控 安全 Linux
Linux系统之安装ServerBee服务器监控工具
【4月更文挑战第22天】Linux系统之安装ServerBee服务器监控工具
41 2
|
3天前
|
固态存储 Ubuntu Linux
Linux(29) 多线程快速解压缩|删除|监视大型文件
Linux(29) 多线程快速解压缩|删除|监视大型文件
11 1
|
3天前
|
Ubuntu Linux 数据安全/隐私保护
Linux(24) 如何在Ubuntu中操作rootfs.img文件
Linux(24) 如何在Ubuntu中操作rootfs.img文件
9 0
|
3天前
|
Linux 开发工具 Android开发
Docker系列(1)安装Linux系统编译Android源码
Docker系列(1)安装Linux系统编译Android源码
6 0