0
点赞
收藏
分享

微信扫一扫

Centos 中7z的压缩与使用

杨小羊_ba17 2022-01-28 阅读 149
7zc++.net


Centos 中7z的压缩与使用

1.安装

  • 1.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/】
  • 1.2 解压缩
tar -xjvf p7zip_16.02_src_all.tar.bz2 -C /usr/local
  • 1.3预安装gcc-c++
yum install gcc-c++
  • 1.4安装7z
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



举报

相关推荐

0 条评论