linux 下面压缩,解压.rar文件以及rar,unrar实例

 

http://www.rarlab.com/download.htm
[root@bass src]# wget http://www.rarlab.com/rar/rarlinux-x64-5.4.b4.tar.gz
#注意版本问题(百度网盘64:http://pan.baidu.com/s/1cl3dQu)
[root@bass src]# tar -xzvf rarlinux-x64-5.4.b4.tar.gz 
rar/
rar/order.htm
rar/acknow.txt
rar/readme.txt
rar/rar_static
rar/default.sfx
rar/license.txt
rar/rarfiles.lst
rar/whatsnew.txt
rar/makefile
rar/rar
rar/unrar
rar/rar.txt
[root@bass src]# cd rar
[root@bass rar]# ls
acknow.txt   license.txt  order.htm  rarfiles.lst  rar.txt     unrar
default.sfx  makefile     rar        rar_static    readme.txt  whatsnew.txt
[root@bass 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
[root@bass src]# ls
a.tar       htop-1.0.2.tar.gz  rarlinux-x64-5.4.b4.tar.gz  sh-vsftpd.tar
htop-1.0.2  rar                schema.sql
[root@bass src]# rar a schema.sql.rar schema.sql 

RAR 5.40 beta 4   Copyright (c) 1993-2016 Alexander Roshal   23 Jul 2016
Trial version             Type RAR -? for help

Evaluation copy. Please register.

Creating archive schema.sql.rar

Adding    schema.sql                                                  OK 
Done
[root@bass src]# ls
a.tar       htop-1.0.2.tar.gz  rarlinux-x64-5.4.b4.tar.gz  schema.sql.rar
htop-1.0.2  rar                schema.sql                  sh-vsftpd.tar
[root@bass src]# unrar x schema.sql.rar 

UNRAR 5.40 beta 4 freeware      Copyright (c) 1993-2016 Alexander Roshal


Extracting from schema.sql.rar


Would you like to replace the existing file schema.sql
113197 bytes, modified on 2016-05-20 16:14
with a new one
113197 bytes, modified on 2016-05-20 16:14

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

Extracting  schema.sql                                                OK 
All OK
[root@bass src]# ls
a.tar       htop-1.0.2.tar.gz  rarlinux-x64-5.4.b4.tar.gz  schema.sql.rar
htop-1.0.2  rar                schema.sql                  sh-vsftpd.tar

 

posted @ 2016-08-01 13:37  bass  阅读(979)  评论(0编辑  收藏  举报