sourceforge下载源代码
wget https://sourceforge.net/projects/p7zip/files/p7zip/16.02/p7zip_16.02_src_all.tar.bz2
解压
tar -jxvf p7zip_16.02_src_all.tar.bz2

cd p7zip_16.02

README里builde介绍
62     make          : to build bin/7za
这里生成7za 即是可运行命令文件

所以直接
make 就能完成编译生成
接着
./install.sh
完成可运行文件和相关帮助手册自动拷贝,到此编译安装完成。

7za a ./file.7z /directory_or_file 压缩文件到file.7z
7za e file.7z 不保留目录解压
7za x file.7z 带目录解压
7za l file.7z 查看压缩包内容


  a : Add files to archive
  b : Benchmark
  d : Delete files from archive
  e : Extract files from archive (without using directory names)
  h : Calculate hash values for files
  i : Show information about supported formats
  l : List contents of archive
  rn : Rename files in archive
  t : Test integrity of archive
  u : Update files to archive
  x : eXtract files with full paths