一.简介
7z,全称7-Zip, 是一款开源软件。是目前公认的压缩比例最大的压缩解压软件。
主要特征:
# 全新的LZMA算法加大了7z格式的压缩比
# 支持格式:
* 压缩 / 解压缩:7z, XZ, BZIP2, GZIP, TAR, ZIP
* 仅解压缩:ARJ, CAB, CHM, CPIO, DEB, DMG, FAT, HFS, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, RAR, RPM, UDF, VHD, WIM, XAR, Z
命令行版本下载:http://7z.sparanoid.com/download.html
SourceForge下载:http://sourceforge.net/projects/sevenzip/?source=typ_redirect
7z.exe在Windows cmd窗口使用说明如下:
7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
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)
l: List contents of archive
t: Test integrity of archive
u: Update files to archive
x: eXtract files with full paths
<Switches>
-ai[r[-|0]]{@listfile|!wildcard}: Include archives
-ax[r[-|0]]{@listfile|!wildcard}: eXclude archives
-bd: Disable percentage indicator
-i[r[-|0]]{@listfile|!wildcard}: Include filenames
-m{Parameters}: set compression Method
-o{Directory}: set Output directory
-p{Password}: set Password
-r[-|0]: Recurse subdirectories
-scs{UTF-8 | WIN | DOS}: set charset for list files
-sfx[{name}]: Create SFX archive
-si[{name}]: read data from stdin
-slt: show technical information for l (List) command
-so: write data to stdout
-ssc[-]: set sensitive case mode
-ssw: compress shared files
-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
中文使用说明如下:
语法:7z <命令行> [<选项>...] <基本档案名称> [<参数变量>...]
7z <command> [<switch>...] <base_archive_name> [<arguments>...]* g8 T1 {- l2 e) P% T' V; A
<参数变量> ::= <选项> | <通配符> | <文件名> | <文件列表>
<选项>::= <选项标记><选项字符>[<选项>]
<选项标记> ::= '/' | '-'
<文件列表> ::= @{文件名} ( @4 _; F r6 j. t+ a5 @
<arguments> ::= <switch> | <wildcard> | <filename> | <list_file>
<switch>::= <switch_symbol><switch_characters>[<option>]
<switch_symbol> ::= '/' | '-'
<list_file> ::= @{filename}
在方括号内的表达式(“[” 和 “]”之间的字符)是可选的。' ?2 k0 k/ m* f. Q$ c4 h
在书名号内的表达式(“<” 和 “>”之间的字符)是必须替换的表达式(而且要去掉括号)。
表达式
expression1 | expression2 | ... | expressionN* R- s: |- P/ n& m9 C
命令行 及 选项 使用大写或小写字母都可以。
首个命令行必须是无选项的参数变量。
选项及其它文件名的输入顺序可以打乱。
带有空格的通配符或文件名必须加上引号:
"Dir\Program files\*"+ r+ u2 k b' Z& U. n
Dir\"Program files"\*. M R V3 S/ s
通配符是一个键盘字符,例如星号(*)或问号(?),当执行添加文件、释放文件、选定文件、删除文件等操作时,您可以使用它来代表一个或多个字符。当您不知道真正字符或者不想键入完整名称时,常常使用通配符代替一个或多个字符。
7-Zip 支持和 Windows 相类似的通配符:
“*”可以使用星号代替零个或多个字符。
“?”可以用问号代替名称中的单个字符。