蓝色的天_90  

Mac 电脑经常收到别人传过来的压缩文件,有后缀是 zip 和 rar的,Mac 是默认支持解压缩 zip后缀的压缩文件的,但是 rar却不在默认支持的范围内。

1.下载 rar 工具

我们先来安装一下 rar 的工具,网址是https://www.rarlab.com/download.htm,打开这个网站如下:

 

  • 下载之后解压
  • 2.安装 rar

    进入到解压后的rar文件夹中,执行如下的安装命令:

  • sudo install -c -o $USER rar /usr/local/bin/

     

  • sudo install -c -o $USER unrar /usr/local/bin/

     

3.使用 rar

3.1 解压

解压rar后缀的压缩文件,使用如下的解压命令

unrar x 压缩包的名字.rar

#x 代表解压参数

UNRAR 6.12 freeware      Copyright (c) 1993-2022 Alexander Roshal


Extracting from 2.rar


Would you like to replace the existing file 5.txt
 11577 bytes, modified on 2022-07-22 16:03
with a new one
 44233 bytes, modified on 2022-08-05 08:37

[Y]es, [N]o, [A]ll, n[E]ver, [R]ename, [Q]uit y

Extracting  5.txt                                                     OK 
Extracting  6.txt                                                     OK 
Extracting  7.txt                                                     OK 
Extracting  8.txt                                                     OK 
Extracting  9.txt                                                     OK 
Extracting  10.txt                                                    OK 
Extracting  11.txt                                                    OK 
Extracting  12.txt                                                    OK 
Extracting  13.txt                                                    OK 
Extracting  14.txt                                                    OK 
Extracting  15.txt                                                    OK 
Extracting  16.txt                                                    OK 
Extracting  17.txt                                                    OK 
Extracting  18.txt                                                    OK 
Extracting  19.txt                                                    OK 
Extracting  20.txt                                                    OK 
Extracting  21.txt                                                    OK 
Extracting  22.txt                                                    OK 
Extracting  23.txt                                                    OK 
Extracting  24.txt                                                    OK 
Extracting  25.txt                                                    OK 
Extracting  26.txt                                                    OK 
Extracting  27.txt                                                    OK 
Extracting  28.txt                                                    OK 

       

3.2 压缩

压缩 rar,使用如下的压缩命令

rar a 压缩后的文件名称.rar 文件1 文件2

 

posted on 2022-08-10 11:36  蓝色的天_90  阅读(1276)  评论(0编辑  收藏  举报