mac 解压rar文件

本文介绍了如何在Mac上使用终端和homebrew工具来解压rar文件,包括unrar命令的常用参数,如x(解压)、t(测试)和l(列出文件)。通过简单几步,即可轻松完成rar文件的解压操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

使用终端命令行可快速解压。

终端事先要安装macos包管理工具homebrew,可自行搜索安装方法。官网链接
步骤

  • 验证Homebrew已安装

~$brew --version

Homebrew 2.0.5

Homebrew/homebrew-core (git revision 9ae4; last commit 2019-03-20)

Homebrew/homebrew-cask (git revision d48cb; last commit 2019-03-21)

  • 安装解压包
~$brew install unrar
  • 检查是否安装上,出现安装包unrar
~$brew list
icu4c		node		readline	unrar

【解压常用方法】

cd 到解压文件夹

unrar x 解压文件名

.rar 文件与 解压的文件夹在同一目录下

【其他方法】

格式:unrar 参数 解压文件,

x参数用于解压文件,t参数用于测试是否损坏,l参数用于列出文件。

unrar -? 获取帮助

unrar x 解压文件名 <== 解压文件

unrar t 解压文件名 <== 测试文件

unrar l 解压文件名 <== 列出文件

以上方法已足够用。下面是完整方法,比较复杂。

$unrar -?

UNRAR 5.70 freeware      Copyright (c) 1993-2019 Alexander Roshal

Usage:     unrar <command> -<switch 1> -<switch N> <archive> <files...>
               <@listfiles...> <path_to_extract\>

<Commands>
  e             Extract files without archived paths
  l[t[a],b]     List archive contents [technical[all], bare]
  p             Print file to stdout
  t             Test archive files
  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
  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>       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
  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
  r             Recurse subdirectories
  sc<chr>[obj]  Specify the character set
  sl<size>      Process files with size less than specified
  sm<size>      Process files with size more than specified
  ta[mcao]<d>   Process files modified after <d> YYYYMMDDHHMMSS date
  tb[mcao]<d>   Process files modified before <d> YYYYMMDDHHMMSS date
  tn[mcao]<t>   Process files newer than <t> time
  to[mcao]<t>   Process files older than <t> time
  ts[m,c,a]     Save or restore file time (modification, creation, access)
  u             Update files
  v             List all volumes
  ver[n]        File version control
  vp            Pause before each volume
  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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值