所需软件 RAR 3.71 for Linux (最新stable版本)
下载地址为http://www.rarlab.com/rar/rarlinux-3.7.1.tar.gz ,rar for 其它系统的版本在这里也可以找到

安装
tar xzvf rarlinux-3.7.1.tar.gz
cd rar
make install

rar 和 unrar 命令将会复制到 /usr/local/bin 下

一些参数的说明
  1) a 添加文件到操作文档 举例rar a test.rar file1.txt

  若test.rar文件不存在,则打包file1.txt文件成test.rar rar a test.rar file2.txt 若test.rar文件已经存在,则添加file2.txt文件到test.rar中(这样 test.rar中就有两个文件了) 注,如果操作文档中已有某文件的一份拷贝,则a命令更新该文件 另,对目录也可以进行操作 eg. rar a test.rar dir1 。

  2) e test.rar 注,用e解压的话,所有文件都被解压到当前目录下,不能保持压缩前的目录结构。
     
      如果想保持压缩前的目录结构,用 x 解压。

  3) c 对操作文档添加说明注释 eg. rar c test.rar

  (会出现Reading comment from stdin字样,然后输入一行或多行注释,以ctrl+d结束)。

  4) cf 添加文件注释,类似上面的c,不过这个是对压缩文档中每个文件进行注释 cw 将文档注释写入文件 eg. rar cw test.rar comment.txt。

  5) d 从文档中删除文件 eg. rar d test.rar file1.txt e

  将文件解压到当前目录 eg. rar。

  6) r 修复文档 eg. rar r test.rar

  当rar文件有问题时,可以尝试用该命令进行修复 。

  7) s 转换文档成自解压文档 eg. rar s test.rar

  会生成一个test.sfx的可执行文档,运行它的效果就相当于rar x test.rar, 适合于向没有rar的用户传输文件。

  8) t 检测文档 eg. rar t test.rar

  检测test.rar的完整性。

  9) k 锁定文档 eg. rar k test.rar

  锁定文档后,该文档就无法进行任何更新操作了。
Tags:
linux系统相关 | 评论(0) | 引用(0) | 阅读(129)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
昵称   密码   游客无需密码
网址   电邮   [注册]
               

验证码 请输入左侧的字母,不区分大小写