一.widonds下打包rar文件并上傳
yum install lrzsz?
rz test.rar
1.下載:根據主機系統(tǒng)下載合適的版本,當前64為centos系統(tǒng)演示下載:
wget http://www.rarlab.com/rar/rarlinux-x64-5.3.0.tar.gz
2.解壓安裝
tar xvf rarlinux-x64-5.3.0.tar.gz
cd rar
make install
OK!
壓縮一個文件:
rar? a? -r? yii-basic-2.0.15.rar? yii-basic-2.0.15
2.1 下載( 版本較低,可能不支持windows壓縮rar)
mkdir -p? /home/oldboy/tools
cd /home/oldboy/tools
wget http://www.rarlab.com/rar/rarlinux-3.8.0.tar.gz
2.2 安裝
tar zxvf rarlinux-3.8.0.tar.gz
cd rar
make
make install
三平斩、rar命令語法
將/etc 目錄壓縮為etc.rar 命令為:
rar a etc.rar /etc
將etc.rar 解壓 命令為:
rar x etc.rar
unrar -e etc.tar
四、具體例子
實例:將/etc 目錄壓縮為etc.rar
[root@yonggetools]# rar a etc.rar /etc
將etc.rar 解壓:
[root@yonggetools]# rar x etc.rar
RAR 3.80? Copyright (c) 1993-2008 Alexander Roshal? 16 Sep 2008
[root@localhost www]# cd /usr/etc
[root@localhost etc]# ll
[root@localhost etc]# mkdir tools
[root@localhost etc]# ll
? drwxr-xr-x 2 root root 6 Oct 22 21:12 tools
[root@localhost etc]# cd tools
[root@localhost tools]# wget http://www.rarlab.com/rar/rarlinux-3.8.0.tar.gz
[root@localhost tools]# tar zxvf rarlinux-3.8.0.tar.gz
[root@localhost tools]# cd rar
[root@localhost rar]# make && make install
[root@localhost rar]# cd /www
[root@localhost www]# ll
[root@localhost www]# rar x Novel.rar
-bash: /usr/local/bin/rar: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory