7zip中文网

7zip

7-Zip 是一款拥有极高压缩比的开源压缩软件。

下载 7-Zip 22.01 稳定版适用于 Windows 操作系统(2022-07-15):

 下载7zip 64-bit x64  下载7zip 32-bit x86  下载7zip 64-bit ARM64

许可协议

7-Zip 是一款 开源 的 免费 软件。大多数源代码都基于 GNU LGPL 许可协议下发布。部分代码基于 BSD 3 句条款(BSD 3-clause)许可协议发布。并且,部分代码受到了 unRAR 许可协议的限制。更多许可信息请查看:7-Zip 许可。

您可以在任何一台计算机上使用 7-Zip ,包括用在商业用途的计算机。不对 7-Zip 进行注册或支付费用并不影响您的使用。

7-Zip 主要特征

  • 使用了 LZMA 与 LZMA2 算法的 7z 格式 拥有极高的压缩比
  • 支持格式:
    1. 压缩 / 解压缩:7z、XZ、BZIP2、GZIP、TAR、ZIP 以及 WIM
      仅解压缩:AR、ARJ、CAB、CHM、CPIO、CramFS、DMG、EXT、FAT、GPT、HFS、IHEX、ISO、LZH、LZMA、MBR、MSI、NSIS、NTFS、QCOW2、RAR、RPM、SquashFS、UDF、UEFI、VDI、VHD、VMDK、WIM、XAR 以及 Z
  • 与 ZIP 及 GZIP 格式相比,7-Zip 能提供比使用 PKZip 及 WinZip 高 2-10% 的压缩比
  • 为 7z 与 ZIP 提供更完善的 AES-256 加密算法
  • 7z 格式支持创建自释放压缩包
  • Windows 资源管理器集成
  • 强大的文件管理器
  • 强大的命令行版本
  • 支持 FAR Manager 插件
  • 支持 87 种语言
  • 7-Zip 适用于 Windows 10 / 8 / 7 / Vista / XP / 2016 / 2012 / 2008 / 2003 / 2000。


    p7zip

    7zip - Linux/Posix 平台的命令行移植版本。

    p7zip是移植到POSIX/Unix-like系统的7-Zip软件,可以压缩解压7z格式的文件。常用命令包括7z和7za,通过参数调整压缩解压设置。其支持的系统包括但不限于Linux内核的Debian、Fedora、Gentoo Linux、AltLinux.org,非Linux内核的FreeBSD、Mac OS X、iOS(越狱后可安装)、BeOS、FreeDOS、AmigaOS等。

    从4.10开始,p7zip (7-zip)支持little-endian和big-endian。

    p7zip首页

    安装p7zip

  • 通过源码安装
  • Linux下最好使用源码进行安装,各发行版通用,安装过程如下:

    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
  • Debian/Ubuntu(apt系)
  • 使用apt-get install p7zip-full进行安装即可。

  • CentOS/Fedora/RHEL(rpm系)
  • rpm包下载地址:http://rpmfind.net/linux/rpm2html/search.php?query=p7zip(x86-64),下载后使用 rpm -ivh p7zip-17.04-3.mga9.x86_64.rpm来安装。

    p7zip使用实例

  • 压缩文档
  • 
    [root@localhost oneinstack]# du -sh     ##当前目录大小
    1.8M    .
    [root@localhost oneinstack]# 7za a oi.7z *   ##将当前目录所有文件压缩保存为oi.7z
    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)
    Scanning the drive:
    7 folders, 128 files, 1541017 bytes (1505 KiB)
    Creating archive: oi.7z
    Items to compress: 135
    Files read from disk: 128
    Archive size: 131726 bytes (129 KiB)
    Everything is Ok
    [root@localhost oneinstack]# ls -lh oi.7z  ###压缩后大小
    -rw-r--r-- 1 root root 129K Jun 16 15:59 oi.7z
                    

    p7zip默认使用7z格式,当然它还支持一些通用的压缩格式,如7z, lzma, cab, zip, gzip, bzip2, Z 和tar等等……

  • 解压缩文档
  • 解压缩有两个参数可用,ex

  • e 解压到当前目录,不使用压缩包的目录名
  • [root@localhost test]# 7za -e mx9.7z
    [root@localhost test]# tree
    .
    ├── gor
    ├── gor.exe
    ├── linux32
    ├── linux64
    ├── linuxarm
    ├── mx9.7z
    ├── win32
    └── win64
  • x 按照压缩包内文档结构进行解压,一般这个使用这个参数较多
  • [root@localhost test]# 7za x mx9.7z
    [root@localhost test]# tree .
    .
    ├── gor370
    │   ├── linux32
    │   │   └── gor
    │   ├── linux64
    │   ├── linuxarm
    │   │   └── gor
    │   ├── win32
    │   │   └── gor.exe
    │   └── win64
    │       └── gor.exe
    └── mx9.7z
    格式设置

    使用-t参数来指定压缩格式,使用如下:

    7z a -tzip archive.zip *.txt

    将当前目录下所有txt文件打包压缩为archive.zip

    7z t -t7z.split archive.7z.001

    测试archive.7z.001中的所有文件,同时还支持多7z存档。

    7z x -t# sfxarchive.exe

    使用解析模式提取sfxarchive.exe文件

    7z x -tiso archive.iso

    以ISO存档模式解压archive.iso文件

    7z x -tudf archive.iso

    以UDF存档模式解压archive.iso文件,UDF说明在此https://en.wikipedia.org/wiki/Universal_Disk_Format

    压缩模式设置

    使用-m参数来设置模式,此项设置与文档类型有关。

    7z类型的压缩模式参数:

  • -mx 设置压缩级别,x=[0 | 1 | 3 | 5 | 7 | 9 ]
  • 等级 模式 字典 FastBytes MatchFinder Filter 说明
    0 Copy 无压缩
    1 LZMA2 64 KB 32 HC4 BCJ 最快压缩
    3 LZMA2 1 MB 32 HC4 BCJk 快速压缩
    5 LZMA2 16 MB 32 BT4 BCJ 一般压缩
    7 LZMA2 32 MB 64 BT4 BCJz 最大压缩
    9 LZMA2 64 MB 64 BT4 BCJ2j 极致压缩

    实例如下

    [root@localhost ~]#7za -mx=0 a mx0.7z gor370/*
    [root@localhost ~]#7za -mx=1 a mx1.7z gor370/*
    [root@localhost ~]#7za -mx=3 a mx3.7z gor370/*
    [root@localhost ~]#7za -mx=5 a mx5.7z gor370/*
    [root@localhost ~]#7za -mx=7 a mx7.7z gor370/*
    [root@localhost ~]#7za -mx=9 a mx9.7z gor370/*
    [root@localhost ~]# du -sh gor370/
    31M     gor370/
    [root@localhost ~]# ls -lh m*.7z
    -rw-r--r-- 1 root root  31M Jun 16 16:34 mx0.7z
    -rw-r--r-- 1 root root 8.0M Jun 16 16:34 mx1.7z
    -rw-r--r-- 1 root root 7.8M Jun 16 16:34 mx3.7z
    -rw-r--r-- 1 root root 6.6M Jun 16 16:34 mx5.7z
    -rw-r--r-- 1 root root 6.5M Jun 16 16:35 mx7.7z
    -rw-r--r-- 1 root root 6.4M Jun 16 16:35 mx9.7z

    可以看出压缩级别越高,压缩后的文件体积越小。

    7za 命令帮助

    
    7-Zip [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 QEMU Virtual CPU version (cpu64-rhel6) (6D3),ASM,AES-NI)
    Usage: 7z  [...]  [...]
           [<@listfiles...>]
    
      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
    
      -- : Stop switches parsing
      -ai[r[-|0]]{@listfile|!wildcard} : Include archives
      -ax[r[-|0]]{@listfile|!wildcard} : eXclude archives
      -ao{a|s|t|u} : set Overwrite mode
      -an : disable archive_name field
      -bb[0-3] : set output log level
      -bd : disable progress indicator
      -bs{o|e|p}{0|1|2} : set output stream for output/error/progress line
      -bt : show execution time statistics
      -i[r[-|0]]{@listfile|!wildcard} : Include filenames
      -m{Parameters} : set compression Method
        -mmt[N] : set number of CPU threads
      -o{Directory} : set Output directory
      -p{Password} : set Password
      -r[-|0] : Recurse subdirectories
      -sa{a|e|s} : set Archive name mode
      -scc{UTF-8|WIN|DOS} : set charset for for console input/output
      -scs{UTF-8|UTF-16LE|UTF-16BE|WIN|DOS|{id}} : set charset for list files
      -scrc[CRC32|CRC64|SHA1|SHA256|*] : set hash function for x, e, h commands
      -sdel : delete files after compression
      -seml[.] : send archive by email
      -sfx[{name}] : Create SFX archive
      -si[{name}] : read data from stdin
      -slp : set Large Pages mode
      -slt : show technical information for l (List) command
      -snh : store hard links as links
      -snl : store symbolic links as links
      -sni : store NT security information
      -sns[-] : store NTFS alternate streams
      -so : write data to stdout
      -spd : disable wildcard matching for file names
      -spe : eliminate duplication of root folder for extract command
      -spf : use fully qualified file paths
      -ssc[-] : set sensitive case mode
      -ssw : compress shared files
      -stl : set archive timestamp from the most recently modified file
      -stm{HexMask} : set CPU thread affinity mask (hexadecimal number)
      -stx{Type} : exclude archive type
      -t{Type} : Set type of archive
      -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName] : Update options
      -v{Size}[b|k|m|g] : Create volumes
      -w[{path}] : assign Work directory. Empty path means a temporary directory
      -x[r[-|0]]{@listfile|!wildcard} : eXclude filenames
      -y : assume Yes on all queries
    
    bzip2备份镜像

    :-)   CDN   VPS   Autohotkey   openSUSE   李跳跳   7zip   LTE中文网   QGIS中文网   白鹿原   冰与火之歌   学SQL   八号   RGB色码   UNIXETC   晚清沧海事   古文观止