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

linux 安装rar解压工具

查看:1508  回复: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

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

扫描二维码手机查看

发布评论:


登录:
  表情:
评论话题
推荐阅读:
html5 离线缓存的使用   阅读:1423centos 7 开启网络   阅读:1646小米手机端商城rem适配原理   阅读:2892用php从1加到100的值   阅读:3021php 统计网页打开耗时和脚本运行内存   阅读:2188解决 nginx 413 request entity too large   阅读:1346浅谈javascript的函数节流   阅读:1383mysql的四种索引类型   阅读:3166linux top命令详解   阅读:1508面试的时候回去等通知,等电话的真实意思   阅读:6636linux rarcrack破解rar、zip和7z压缩包简单密码的工具   阅读:2317php 生成图片,给图片加水印   阅读:2279phpexcel 超简单从数据库一键导出数据到excel教程   阅读:2262php+redis实现消息队列   阅读:843php打印九九乘法表   阅读:1965ajax+php 实现一个简单的在线聊天室功能(附带源码)   阅读:3070分享:淘宝技术这十年   阅读:1566用php从1乘到100的值   阅读:2040javascript对cookie操作详细代码函数   阅读:1620php 生成图片,给图片加水印   阅读:2279小米手机端商城rem适配原理   阅读:2892比phpexcel还要简单的excel CSV 一键导入数据到数据库   阅读:1854PHP 鸟哥:我也曾经是“不适合”编程的人   阅读:2668php连接redis   阅读:1946linux时间戳有趣的情人节秒1234567890   阅读:1236封装php redis缓存操作类   阅读:1915php 使用 smtp.php 类在线发送邮件功能   阅读:1900session与cookie的区别   阅读:1508小米手机端商城rem适配原理   阅读:2892移动端自适应rem原理   阅读:4858phpexcel 超简单从数据库一键导出数据到excel教程   阅读:2262人性漫画:打工与创业的残酷区别   阅读:1361web项目高并发量网站解决方案   阅读:1334centos 7 安装 nginx-1.11.10   阅读:3234php 获取当前前后年、月、星期、日、时分秒的时间   阅读:1912centos 7 添加 redis 3.2.9 开机启动脚本   阅读:3126“米粉节”背后的故事——小米网抢购系统开发实践   阅读:1265最新centos7 搭建LNMP环境(centos7.2+php7+mysql5.7+nginx1.11+redis3.2)   阅读:4017网站局部小图片优化-base64编码图片   阅读:2580php冒泡排序法   阅读:1468php冒泡排序法   阅读:1468shell脚本统计当前服务器并发连接数   阅读:1860mysql共享锁和排他锁详解   阅读:1854比phpexcel还要简单的excel CSV 一键导入数据到数据库   阅读:1854nginx编译安装后对nginx进行平滑升级   阅读:370php+redis实现消息队列   阅读:843简单的DOS攻击之死亡之ping详解   阅读:12068知乎百万赞作者告诉你:年薪百万的人都在靠什么赚钱   阅读:1650HTTP 1.1 协议详解   阅读:1827mysql的四种索引类型   阅读:3166