wget –no-check-certificate https://downloads.sourceforge.net/project/p7zip/p7zip/16.02/p7zip_16.02_src_all.tar.bz2
tar -xjvf p7zip_16.02_src_all.tar.bz2
cd p7zip_16.02
make -j 4
make install
看到如下信息就说明你安装成功了:
./install.sh /usr/local/bin /usr/local/lib/p7zip /usr/local/man /usr/local/share/doc/p7zip
– installing /usr/local/bin/7za
– installing /usr/local/man/man1/7z.1
– installing /usr/local/man/man1/7za.1
– installing /usr/local/man/man1/7zr.1
– installing /usr/local/share/doc/p7zip/README
– installing /usr/local/share/doc/p7zip/ChangeLog
– installing HTML help in /usr/local/share/doc/p7zip/DOC
这时如果发现乱码,请执行命令
export LANG=zh_CN.GBK
7zip命令使用方法:
7zip命令7za
具体路径/usr/local/bin/7za,shell脚本记得写全,不然计划任务无法调用提示命令未找到
7za {a|d|l|e|u|x} 压缩包文件名 {文件列表或目录,可选}
a