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 网络安全
Linux环境中安装和使用Paramiko
Linux环境中安装和使用Paramiko
33 12
|
2天前
|
Web App开发 监控 Linux
在Linux上,有许多软件可以下载和安装
在Linux上,有许多软件可以下载和安装
83 67
|
2天前
|
Linux Docker 容器
Centos安装docker(linux安装docker)——超详细小白可操作手把手教程,包好用!!!
本篇博客重在讲解Centos安装docker,经博主多次在不同服务器上测试,极其的稳定,尤其是阿里的服务器,一路复制命令畅通无阻。
28 4
Centos安装docker(linux安装docker)——超详细小白可操作手把手教程,包好用!!!
|
12天前
|
Ubuntu Linux 网络安全
从头安装Arch Linux系统
本文记录了作者安装Arch Linux系统的过程,包括安装成果展示和遇到的疑难点及其解决方法,如硬盘不足、下载失败、设置时区、安装微码和配置无密码登录等。
从头安装Arch Linux系统
|
14天前
|
关系型数据库 MySQL Linux
Linux 安装 mysql 【使用 tar.gz | tar.xz安装包-离线安装】
在Linux系统中使用tar.xz压缩包安装MySQL数据库的详细步骤。包括下载MySQL压缩包,解压到指定目录,创建mysql用户和组,设置目录权限,初始化MySQL,配置my.cnf文件,启动服务,以及修改root用户密码。此外,还提供了如何设置Windows远程登录MySQL服务器的方法。
Linux 安装 mysql 【使用 tar.gz | tar.xz安装包-离线安装】
|
2天前
|
移动开发 Linux
Linux 文件与目录管理
Linux 文件与目录管理
10 3
|
2天前
|
关系型数据库 MySQL Linux
Linux 文件基本属性
Linux 文件基本属性
10 3
|
3天前
|
Ubuntu Linux 数据安全/隐私保护
Linux的安装过程
Linux的安装过程
13 4
|
4天前
|
Linux 定位技术 虚拟化
Linux 安装
Linux 安装
16 5
|
2天前
|
Linux Shell
Linux系统文件默认权限
Linux系统文件默认权限
12 2