欢迎来到php自学网~
阅读模式:

linux 安装rar解压工具

查看:1751  回复:0  类型:  来源:php自学网  标签 运维 centos linux

        linux中默认的tar命令用于解压压缩文件,但是tar命令不支持rar文件的解压和压缩,需要安装rar解压工具,实现rar命令解压rar压缩包。

        1.下载rarlab软件

            官网下载页面:https://www.rarlab.com/download.htm

            rar工具软件下载地址(RAR 5.50 for Linux x64):https://www.rarlab.com/rar/rarlinux-x64-5.5.0.tar.gz

wget -c https://www.rarlab.com/rar/rarlinux-x64-5.5.0.tar.gz

        2.解压和安装rar工具

tar -xzvf rarlinux-x64-5.5.0.tar.gz
#加压后生产rar目录
cd rar

[root@localhost rar]# ls 
acknow.txt  default.sfx  license.txt  makefile  order.htm  rar  rarfiles.lst  rar.txt  readme.txt  unrar  whatsnew.txt

[root@localhost 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
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

        3.使用 rar压缩 unrar解压文件

#压缩
[root@localhost rar]# rar a all *

RAR 5.50   Copyright (c) 1993-2017 Alexander Roshal   11 Aug 2017
Trial version             Type 'rar -?' for help

Evaluation copy. Please register.

Creating archive all.rar

Adding    acknow.txt                                                  OK 
Adding    default.sfx                                                 OK 
Adding    license.txt                                                 OK 
Adding    makefile                                                    OK 
Adding    order.htm                                                   OK 
Adding    rar                                                         OK 
Adding    rarfiles.lst                                                OK 
Adding    rar.txt                                                     OK 
Adding    readme.txt                                                  OK 
Adding    unrar                                                       OK 
Adding    whatsnew.txt                                                OK 
Done
[root@localhost rar]# ls
acknow.txt  default.sfx  makefile   rar           rar.txt     unrar
all.rar     license.txt  order.htm  rarfiles.lst  readme.txt  whatsnew.txt

#解压
unrar e 文件名
[root@localhost rar]# unrar e all.rar

UNRAR 5.50 freeware      Copyright (c) 1993-2017 Alexander Roshal

Extracting from all.rar
Extracting  acknow.txt                                                OK 
Extracting  default.sfx                                               OK 
Extracting  license.txt                                               OK 
Extracting  makefile                                                  OK 
Extracting  order.htm                                                 OK 
Extracting  rar                                                       OK 
Extracting  rarfiles.lst                                              OK 
Extracting  rar.txt                                                   OK 
Extracting  readme.txt                                                OK 
Extracting  unrar                                                     OK 
Extracting  whatsnew.txt                                              OK 
All OK
分享到:
0 0

*有问题之处烦请在评论中指出非常感谢!
不是我想要的内容,继续搜索:

扫描二维码手机查看

发布评论:


登录:
  表情:
评论话题
推荐阅读:
centos 7 修改系统屏幕分辨率   阅读:16351php打印九九加法表   阅读:2083crontab+shell脚本实现定时备份mysql数据库   阅读:1960解决 nginx 413 request entity too large   阅读:1440PHP 鸟哥:我也曾经是“不适合”编程的人   阅读:2896csv文件一键导入数据到mysql数据库   阅读:2276centos 7 设置 nginx-1.11.10 开机启动   阅读:2853mysql的四种索引类型   阅读:3627crontab+shell脚本实现定时备份mysql数据库   阅读:1960web项目高并发量网站解决方案   阅读:1445centos 7 安装 mysql-5.7   阅读:2249HTTP 1.1 协议详解   阅读:2028centos 7 设置 nginx-1.11.10 开机启动   阅读:2853mysql的四种索引类型   阅读:3627php文件下载防盗链   阅读:3462Nginx 配置文件详解   阅读:1666php连接redis   阅读:2087把php session 会话保存到redis   阅读:2426网站局部小图片优化-base64编码图片   阅读:2842php打印九九乘法表   阅读:2267栈和堆的区别   阅读:1518centos 7 开启网络   阅读:1773面试的时候回去等通知,等电话的真实意思   阅读:7499linux教程,鸟哥私房菜(pdf全集)   阅读:1784php+redis实现消息队列   阅读:1174javascript对cookie操作详细代码函数   阅读:1770php打印九九乘法表   阅读:2267centos7.3安装mongodb3.6   阅读:2356centos7.3安装mongodb3.6   阅读:2356用php从1乘到100的值   阅读:2205给网站添加一键新浪微博登录的功能   阅读:2634web性能测试工具ab的测试方法   阅读:1580给网站添加一键新浪微博登录的功能   阅读:2634解决 nginx 413 request entity too large   阅读:1440mysql数据库性能的基本优化   阅读:1869mysql数据库性能的基本优化   阅读:1869php 获取当前前后年、月、星期、日、时分秒的时间   阅读:2006php 获取当前前后年、月、星期、日、时分秒的时间   阅读:2006linux时间戳有趣的情人节秒1234567890   阅读:1391mysql 为什么添加索引可以提高访问速度   阅读:1995一步步带你,如何网站架构   阅读:1480php删除一个文件夹内的所有文件夹和文件   阅读:1946面试的时候回去等通知,等电话的真实意思   阅读:7499web项目高并发量网站解决方案   阅读:1445php+redis实现消息队列   阅读:1174mysql的四种索引类型   阅读:3627用php从1加到100的值   阅读:3169shell脚本统计当前服务器并发连接数   阅读:2058linux命令中执行php脚本   阅读:1822php压缩页面的html代码一行显示   阅读:2270