WINRAR 命令详解

用法:     rar <命令> -<开关 1> -<开关 N> <压缩文件> <文件...>  <@列表文件...> <解压路径/>

<命令>
  a             添加文件到压缩文件
  c             添加压缩文件注释
  cf            添加文件注释
  ch            改变压缩文件参数
  cw            写入压缩文件注释到文件
  d             删除压缩文件中的文件
  e             解压压缩文件到当前目录
  f             刷新压缩文件中的文件
  i[参数]=<串>  在压缩文件中查找字符串
  k             锁定压缩文件
  l[t,b]        列出压缩文件[技术信息,简洁]
  m[f]          移动到压缩文件[仅对文件]
  p             打印文件到标准输出设备
  r             修复压缩文件
  rc            重建丢失的卷
  rn            重命名压缩文件
  rr[N]         添加数据恢复记录
  rv[N]         创建恢复卷
  s[名字|-]     转换压缩文件为自解压格式或转换回压缩文件
  t             测试压缩文件
  u             更新压缩文件中的文件
  v[t,b]        详细列出压缩文件[技术信息,简洁]
  x             用绝对路径解压文件

<开关>
  -             停止扫描
  ac            压缩或解压后清除存档属性
  ad            添加压缩文件名到目标路径
  ag[格式]      使用当前日期生成压缩文件名
  ao            添加具有压缩属性的文件
  ap<格式>      添加路径到压缩文件中
  as            同步压缩文件内容
  av            添加用户身份校验(仅注册版本可用)
  av-           禁用用户身份校验
  c-            禁用注释显示
  cfg-          禁用读取配置
  cl            名称转换为小写
  cu            名称转换为大写
  df            压缩后删除文件
  dh            打开共享文件
  ds            对固实压缩文件禁用名称排序
  e[+]<属性>    设置文件排除和包括属性
  ed            不添加空目录
  en            不添加"压缩文件结束"标志
  ep            从名称中排除路径
  ep1           从名称中排除基本目录
  ep2           展开为完整路径
  ep3           扩展路径为包含盘符的完全路径
  f             刷新文件
  hp[密码]      同时加密文件数据和文件头
  id[c,d,p,q]   禁用消息
  ieml[地址]    用 E-mail 发送压缩文件
  ierr          发送所有消息到标准错误设备
  ilog[名称]    把错误写到日志文件(只有注册版本可用)
  inul          禁用所有消息
  ioff          完成一个操作后关闭 PC 电源
  isnd          启用声音
  k             锁定压缩文件
  kb            保留损坏的已解压文件
  m<0..5>       设置压缩级别(0-存储...3-默认...5-最大)
  mc<参数>      设置高级压缩参数
  md<大小>      以KB为单位的字典大小(64,128,256,512,1024,2048,4096 or A-G)
  ms[ext;ext]   指定存储的文件类型
  mt<线程>      设置线程数
  n<文件>       仅包含指定的文件
  n@            从标准输入设备读取文件名到包括
  n@<列表>      在指定的文件列表包括文件
  o+            覆盖已存在文件
  o-            不覆盖已存在文件
  oc            设置 NTFS 压缩属性
  or            自动重命名文件
  os            保存 NTFS 流
  ow            保存或恢复文件所有者和组
  p[密码]       设置密码
  p-            不询问密码
  r             递归子目录
  r0            仅递归通配符名称的子目录
  ri<P>[:<S>]   设置优先级(0-默认,1-最小..15-最大)和以毫秒为单位的休眠时间
  rr[N]         添加数据恢复记录
  rv[N]         创建恢复卷
  s[<N>,v[-],e] 创建固实压缩文件
  s-            禁用固实压缩文件
  sc<chr>[obj]  指定字符集
  sfx[名称]     创建自解压压缩文件
  st[名称]      从标准输入设备读取数据(stdin)
  sl<大小>      处理小于指定大小的文件
  sm<大小>      处理超过指定大小的文件
  t             压缩后测试文件
  ta<日期>      添加日期 <日期> 后修改的文件,日期格式 YYYYMMDDHHMMSS
  tb<日期>      添加日期 <日期> 前修改的文件,日期格式 YYYYMMDDHHMMSS
  tk            保留原始压缩文件时间
  tl            设置压缩文件时间为最新文件时间
  tn<时间>      添加 <时间> 以后的文件
  to<时间>      添加 <时间> 以前的文件
  ts<m,c,a>[N]  保存或恢复文件时间(修改,创建,访问)
  u             更新文件
  v             自动检测创建卷的大小或者列出所有的卷
  v<大小>[k,b]  创建卷大小=<大小>*1000 [*1024, *1]
  vd            创建容量前清除磁盘内容
  ver[n]        文件版本控制
  vn            使用旧风格的卷命名方案
  vp            每卷之前暂停
  w<路径>       指定工作目录
  x<文件>       排除指定的文件
  x@            从标准输入设备读取要排除的文件名
  x@<列表>      排除指定列表文件中的文件
  y             假设对全部询问都回答是
  z[文件]       从文件读取压缩文件注释

例子:

比如。要压缩 d:/abc  文件夹 并生成 e:/a.rar
简单执行:
c:/progra~1/winrar/rar.exe a e:/a.rar d:/abc 即可。

解压操作:
c:/progra~1/winrar/rar.exe e e:/a.rar d:/abc

其他可以根据 命令 和 开关 来获得更加具体和更加详细的操作,
比如。压缩的时候给压缩文件设置个密码。开关命令是p

我们执行:
c:/progra~1/winrar/rar.exe a -p123456 e:/a.rar d:/abc

这样即可给a.rar 设置密码为  123456,注意 密码和 -p 连接,中间没有空格。

其他开关命令也一样。

 

转自:http://www.cz9.cn/show.asp?id=5

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Linux下的rar解压缩工具: RAR 5.60 beta 1 Copyright (c) 1993-2018 Alexander Roshal 21 Mar 2018 Trial version Type 'rar -?' for help Usage: rar <command> -<switch 1> -<switch N> <archive> <files...> <@listfiles...> <path_to_extract\> <Commands> a Add files to archive c Add archive comment ch Change archive parameters cw Write archive comment to file d Delete files from archive e Extract files without archived paths f Freshen files in archive i[par]=<str> Find string in archives k Lock archive l[t[a],b] List archive contents [technical[all], bare] m[f] Move to archive [files only] p Print file to stdout r Repair archive rc Reconstruct missing volumes rn Rename archived files rr[N] Add data recovery record rv[N] Create recovery volumes s[name|-] Convert archive to or from SFX t Test archive files u Update files in archive 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 as Synchronize archive contents c- Disable comments show cfg- Disable read configuration cl Convert names to lower case cu Convert names to upper case df Delete files after archiving dh Open shared files ds Disable name sort for solid archive dw Wipe files after archiving e[+]<attr> Set file exclude and include attributes ed Do not add empty directories en Do not put 'end of archive' block ep Exclude paths from names ep1 Exclude base directory from names ep3 Expand paths to full including the drive letter f Freshen files hp[password] Encrypt both file data and headers ht[b|c] Select hash type [BLAKE2,CRC32] for file checksum id[c,d,p,q] Disable messages ierr Send all messages to stderr ilog[name] Log errors to file inul Disable all messages isnd Enable sound iver Display the version number k Lock archive kb Keep broken extracted files log[f][=name] Write names to log file m<0..5> Set compression level (0-store...3-default...5-maximal) ma[4|5] Specify a version of archiving format mc<par> Set advanced compression parameters md<n>[k,m,g] Dictionary size in KB, MB or GB ms[ext;ext] Specify file types to store mt<threads> Set the number of threads 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 oh Save hard links as the link instead of the file oi[0-4][:min] Save identical files as references ol[a] Process symbolic links as the link [absolute paths] or Rename files automatically ow Save or restore file owner and group p[password] Set password p- Do not query password qo[-|+] Add quick open information [none|force] r Recurse subdirectories r- Disable recursion r0 Recurse subdirectories for wildcard names only rr[N] Add data recovery record rv[N] Create recovery volumes s[<N>,v[-],e] Create solid archive s- Disable solid archiving sc<chr>[obj] Specify the character set sfx[name] Create SFX archive si[name] Read data from standard input (stdin) sl<size> Process files with size less than specified sm<size> Process files with size more than specified t Test files after archiving ta<date> Process files modified after <date> in YYYYMMDDHHMMSS format tb<date> Process files modified before <date> in YYYYMMDDHHMMSS format tk Keep original archive time tl Set archive time to latest file tn<time> Process files newer than <time> to<time> Process files older than <time> ts[m|c|a] Save or restore file time (modification, creation, access) u Update files v<size>[k,b] Create volumes with size=<size>*1000 [*1024, *1] ver[n] File version control vn Use the old style volume naming scheme vp Pause before each volume w<path> Assign work directory 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 z[file] Read archive comment from file
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值