Centos 中7z的压缩与使用
1.安装
wget https://nchc.dl.sourceforge.net/project/p7zip/p7zip/16.02/p7zip_16.02_src_all.tar.bz2
【也可以通过以下链接手动下载:https://sourceforge.net/projects/p7zip/files/p7zip/16.02/】
tar -xjvf p7zip_16.02_src_all.tar.bz2 -C /usr/local
yum install gcc-c++
cd /usr/localp7zip_16.02
make
make install
- 1.5注:
make install
的界面如下:
[root@server4 p7zip_16.02]# 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
2.简单使用
7za a sty.7z data.txt #这个a参数[add]是用于将data.txt 加入到sty.7z中
man 7za
ll
-rw-------. 1 root root 48 Aug 17 17:24 data.txt
-rw-r--r--. 1 root root 172 Aug 31 22:55 sty.7z