UNIX Publication


在此只推荐从源码安装p7zip,下载地址 http://www.7-zip.org/download.html

源码在这里下载 https://sourceforge.net/projects/p7zip/files/p7zip/

wget https://sourceforge.net/projects/p7zip/files/p7zip/16.02/p7zip_16.02_src_all.tar.bz2
tar jxf p7zip_16.02_src_all.tar.bz2
cd p7zip_16.02
make install


[root@localhost ~]# 7za
7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,1 CPU x64)

Usage: 7za <command> [<switches>...] <archive_name> [<file_names>...]

  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


7za a pak.7z ./photos/*.jpg    #压缩./photo/目录下所有jpg文件为pak.7z


7za x pak.7z