June 6, 2017

CentOS7安装使用p7zip

在此只推荐从源码安装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 
make install

使用p7zip

[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>...]
   [<@listfiles...>]

<Commands>
  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

© unixetc.com 2012 - 2019
README