
Linux本身不支持unrar和rar命令,需要我们安装RAR for Linux
地址:https://www.rarlab.com/download.htm选择对应的版本进行下载。
1、下载
[root@localhost ~]# wget https://www.rarlab.com/rar/rarlinux-x64-5.9.0.tar.gz
2、安装
[root@localhost ~]# tar xf rarlinux-x64-5.9.0.tar.gz
[root@localhost ~]# cd rar/
[root@localhost rar]# make && make install
1、压缩:rar a [不含.rar后缀的压缩包名字] [需要压缩的文件或者文件夹]
2、解压:rar x [rar的压缩包]
实例:将/tmp目录压缩为tmp.rar
[root@localhost ~]# rar a tmp.rar /tmp

将tmp.rar 解压
[root@localhost ~]# rar x tmp.rar

[root@localhost ~]# rar


本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。