Linux下rar压缩解压缩程序rar的安装使用方法

2013年04月20日

转载请注明出处:https://www.myzhenai.com/thread-15509-1-1.html https://www.myzhenai.com.cn/post/1040.html
Linux下默认是不能压缩解压缩rar压缩文档的,要在linux下处理.rar文件,需要安装RAR for Linux,可以从网上下载,但要记住,RAR for Linux不是免费的;(但是网上有人说试用版的也可以无限期试用,不知真假)
在这里我们下载安装的是命令行的程序,是没有界面的,只能在终端下执行命令进行操作的程序.
官方网站:https://www.rarlab.com/
备用下载地址:https://ruclinux.googlecode.com/files/unrar.tar.gz //此文档包含一个32bit和64bit安装包,还有一个源码包.
如果你的系统是32 bit版本的,请执行以下代码

#wget https://www.rarlab.com/rar/rarlinux-4.2.0.tar.gz
#tar xzvf rarlinux-4.2.0.tar.gz
#cd rar
#make
#make install

 

//安装成功会提示以下内容

#mkdir -p /usr/local/bin
#mkdir -p /usr/local/lib
#cp rar unrar /usr/local/bin
#cp rarfiles.lst /etc
#cp default.sfx /usr/local/lib

 
如果你的系统是64 bit版本的,请替换以下命令

#wget https://www.rarlab.com/rar/rarlinux-x64-4.2.0.tar.gz

 
压缩使用rar,解压使用unrar

#rar -help
RAR 4.20   Copyright (c) 1993-2012 Alexander Roshal   9 Jun 2012
Trial version             Type RAR -? for help

Usage:     rar  - -  
               < @listfiles...> 


  a             Add files to archive
  c             Add archive comment
  cf            Add files comment
  ch            Change archive parameters
  cw            Write archive comment to file
  d             Delete files from archive
  e             Extract files to current directory
  f             Freshen files in archive
  i[par]=  Find string in archives
  k             Lock archive
  l[t,b]        List archive [technical, 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,b]        Verbosely list archive [technical,bare]
  x             Extract files with full path


  -             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      Set path inside archive
  as            Synchronize archive contents
  av            Put authenticity verification (registered versions only)
  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
  df            Delete files after archiving
  dh            Open shared files
  ds            Disable name sort for solid archive
  dw            Wipe files after archiving
  e[+]    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
  id[c,d,p,q]   Disable messages
  ierr          Send all messages to stderr
  ilog[name]    Log errors to file (registered versions only)
  inul          Disable all messages
  isnd          Enable sound
  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)
  mc       Set advanced compression parameters
  md      Dictionary size in KB (64,128,256,512,1024,2048,4096 or A-G)
  ms[ext;ext]   Specify file types to store
  mt   Set the number of threads
  n       Include only specified file
  n@            Read file names to include from stdin
  n@      Include files listed in specified list file
  o[+|-]        Set the overwrite mode
  ol            Save symbolic links as the link instead of the file
  or            Rename files automatically
  ow            Save or restore file owner and group
  p[password]   Set password
  p-            Do not query password
  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[,v[-],e] Create solid archive
  s-            Disable solid archiving
  sc[obj]  Specify the character set
  sfx[name]     Create SFX archive
  si[name]      Read data from standard input (stdin)
  sl      Process files with size less than specified
  sm      Process files with size more than specified
  t             Test files after archiving
  ta      Process files modified after  in YYYYMMDDHHMMSS format
  tb      Process files modified before  in YYYYMMDDHHMMSS format
  tk            Keep original archive time
  tl            Set archive time to latest file
  tn

 
用法:RAR 的 – 1>
< @ listfiles <套件...>

< 命令>
a添加文件到压缩文件
c添加归档评论
比照添加文件评论
CH更改归档参数
连续写归档回应文件
d删除文件从归档
Ë提取文件到当前目录
f清新压缩包里的文件
[PAR] = 档案中查找字符串
K表锁归档
L [T,B]列表归档技术,裸]
M [F]只移动到存档文件]
p打印文件到stdout
ŗ维修档案
RC重建丢失的卷
RN重命名存档文件
RR [N]添加数据恢复记录
RV [N]创建恢复卷
[名称| – ]转换归档或从SFX
t检验归档文件
u更新文件存档
V [T,B]详细列出归档技术,裸]
x解压缩文件的完整路径


– 停止开关扫描
@ [+]禁用[启动]文件列表
附加压缩文件名到目标路径
AG [格式]使用当前日期生成压缩文件名
AI忽略文件属性
AP 的设置存档路径里面
同步归档内容
AV的认沽真实性验证(仅注册版本)
AV-禁用真伪检查
C-禁用注释显示
CFG-禁用读取配置
CL名小写
立方转换大写名称
DF删除文件归档后
DH打开共享文件
DS禁用固实压缩文件名称排序
DW擦拭文件归档后
Ë[+] 的设置文件排除和包含属性
编不添加空目录
恩不要把存档’块’端
EP排除路径名称
EP1排除基本目录名
EP3展开充分的路径,包括驱动器号
f清新文件
HP [密码]加密文件数据和头
ID [C,D,P,Q]禁用消息
IERR发送所有消息到stderr
ILOG [名称]记录错误文件(仅限于注册版本)
inul禁用所有消息
ISND启用声音
K表锁归档
kb,在打破提取的文件
日志[F] [=名称]写名到日志文件
M <0 .. 5>设置压缩级别(0-店… 3默认5最大)
MC的设置先进的压缩参数
MD 字典大小(KB)(64,128,256,512,1024,2048,4096或AG)
MS [转分机指定文件类型来存储
设置的线程数
Ñ​​文件仅包含指定的文件
Ñ​​@从标准输入读取文件名,包括
Ñ​​@ 包括指定列表文件中列出的文件
问题o [+ | – ]设置覆盖模式
醇保存的文件的链接,而不是符号链接
或自动重命名文件
嗷嗷保存或恢复文件的所有者和组
P [密码]设置密码
对没有查询密码
ŗ递归子目录
R-禁用递归
R0 RECURSE的通配符名称的子目录
RR [N]添加数据恢复记录
RV [N]创建恢复卷
[,V [ – ],E]创建固实压缩文件
S-禁用固体归档
sc [下OBJ]指定字符集
SFX [名称]创建自解压文件
SI [名称]从标准输入(stdin读取数据)
SL 过程文件大小小于规定
SM
过程的文件大小超过指定
t测试文件归档后
TA 过程文件修改YYYYMMDDHHMMSS格式
YYYYMMDDHHMMSS格式
前TB 过程修改过的文件
TK保持原始存档时间
TL设置压缩文件时间为最新
TN

#unrar -help
UNRAR 4.20 freeware      Copyright (c) 1993-2012 Alexander Roshal

Usage:     unrar  - -  
               < @listfiles...> 


  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


  -             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      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       Include only specified file
  n@            Read file names to include from stdin
  n@      Include files listed in specified 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      Process files with size less than specified
  sm      Process files with size more than specified
  ta      Process files modified after  in YYYYMMDDHHMMSS format
  tb      Process files modified before  in YYYYMMDDHHMMSS format
  tn

 
UNRAR 4.20免费版权所有(c)1993-2012亚历山大罗沙利

用法:unrar的 – 1>
< @ listfiles <套件...>

< 命令>
Ë提取文件到当前目录
L [T,B]列表归档技术,裸]
p打印文件到stdout
t检验归档文件
V [T,B]详细列出归档技术,裸]
x解压缩文件的完整路径


– 停止开关扫描
@ [+]禁用[启动]文件列表
附加压缩文件名到目标路径
AG [格式]使用当前日期生成压缩文件名
AI忽略文件属性
AP 的设置存档路径里面
AV-禁用真伪检查
C-禁用注释显示
CFG-禁用读取配置
CL名小写
立方转换大写名称
DH打开共享文件
EP排除路径名称
EP3展开充分的路径,包括驱动器号
f清新文件
ID [C,D,P,Q]禁用消息
IERR发送所有消息到stderr
inul禁用所有消息
kb,在打破提取的文件
Ñ​​文件仅包含指定的文件
Ñ​​@从标准输入读取文件名,包括
Ñ​​@ 包括指定列表文件中列出的文件
问题o [+ | – ]设置覆盖模式
或自动重命名文件
嗷嗷保存或恢复文件的所有者和组
P [密码]设置密码
对没有查询密码
ŗ递归子目录
SL 过程文件大小小于规定
SM
过程的文件大小超过指定
TA 过程文件修改YYYYMMDDHHMMSS格式
YYYYMMDDHHMMSS格式
前TB 过程修改过的文件
TN

linux rar unrar

linux rar unrar


sicnature ---------------------------------------------------------------------
Your current IP address is: 35.173.181.0
Your IP address location: 美国弗吉尼亚阿什本
Your IP address country and region: 美国 美国
Your current browser is:
Your current system is:
Original content, please indicate the source:
同福客栈论坛 | 蟒蛇科普海南乡情论坛 | JiaYu Blog
sicnature ---------------------------------------------------------------------
Welcome to reprint. Please indicate the source http://www.myzhenai.com.cn/post/1040.html

3条评论

  • 新秀源码 2013年04月20日在8:09 上午

    正在学习linux 可以参考下 已添加贵站友链,

    • 海南胡说 2013年04月21日在3:45 上午

      您好,我没有在您的网站上看到链接呢?谢谢.

  • 糗事 2013年04月20日在10:09 下午

    多年没有玩linux了

回复 海南胡说 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注