命令行大全

zipinfo

瑞兹 发表于 2020-12-29 09:10浏览次数:

在像Unix一样操作系统上,zipinfo命令列出了有关ZIP存档的技术信息。

查看英文版

目录:

1 zipinfo 运行系统环境

2 zipinfo 描述

3 zipinfo 语法

4 zipinfo 例子

zipinfo 运行系统环境

Unix&Linux

zipinfo 描述

zipinfo列出了有关 zip 存档中文件的技术信息,最常见的信息是在MS-DOS 系统上发现的。这些信息包括文件访问权限,加密状态,压缩类型,版本和操作系统或压缩程序的文件系统。默认行为(没有选项)是列出存档中每个文件的单行条目,标题行和挂图行为整个存档提供摘要信息。格式是 Unix [ls -l]和 [unzip -v] 输出之间的交叉。请注意,zipinfo与解压缩程序相同在 Unix 下,链接到它);但是,在某些系统上,在编译解压缩时,zipinfo 支持可能已被省略。
zipinfo lists technical information about files in a zip archive, most commonly found on MS-DOS systems. Such information includes file access permissions, encryption status, type of compression, version and operating system or file system of compressing program. The default behavior (with no options) is to list single-line entries for each file in the archive, with header and trailer lines providing summary information for the entire archive. The format is a cross between Unix "ls -l" and "unzip -v" output. Note that zipinfo is the same program as unzip (under Unix, a link to it); on some systems, however, zipinfo support may have been omitted when unzip was compiled.

查看英文版

查看中文版

zipinfo 语法

zipinfo [-12smlvhMtTz] file[.zip] [file(s) ...] [-x xfile(s) ...]

参数

zipinfo命令采用以下参数:

file[.zip] zip存档的路径。如果文件规范是通配符,则每个匹配文件都按操作系统(或文件系统)确定的顺序进行处理。只有文件名可以是通配符;路径本身不能。通配符表达式类似于 Unix egrep 正则表达式,并且可能包含:

* 匹配 0 个或更多字符的序列。
? 完全匹配 1 个字符。
[...] 匹配括号内的任何单个字符;范围由开头字符、连字符和结束字符指定。如果感叹号或括号("!""+")跟在左括号之后,则括号内的字符范围将相互补充(也就是说,除括号内的字符外的任何字符都被视为匹配字符)。要指定逐字左括号,必须使用三个字符的序列"+"。
(请务必引用操作系统可能解释或修改的任何字符,特别是在 Unix 和VMS下。如果未找到匹配项,则假定规范为文本文件名;如果找不到匹配项,则假定为文本文件名;如果找不到匹配项,则假定为文本文件名。如果此操作也失败,则附加.zip后缀。请注意,与任何其他zip 存档一样,支持自提取 zip 文件;只需显式.exe后缀(如果有)。
file... 要处理的存档成员的可选列表,用空格分隔。正则表达式或通配符可用于匹配多个成员;见上文。同样,请务必引用操作系统将展开或修改的表达式。
- x x file... 要从处理中排除的存档成员的可选列表。

选项

-1 仅列出文件名,每行一个。此选项不包括所有其他选项;标题、预告片和 zipfile注释永远不会打印。它用于 Unix shell脚本。
-2 仅列出文件名,每行一个,但允许标题 (-h), 拖车 (-t) 和 zipfile 注释 (-z), 以及。在存储的文件名特别长的情况下,此选项可能很有用。
- s 列出 zipfile 信息在短 Unix [ls - l] 格式。这是默认行为。
- m 以中等 Unix[ls -l] 格式列出 zipfile信息。与-s 输出相同,但也会列出压缩因子(以百分比表示)。
- l 以长 Unix[ls -l] 格式列出 zipfile信息。与-m 一样,只是压缩大小(以字节为单位)是打印的,而不是压缩比。
- v 以详细、多页格式列出 zipfile 信息。
- h 列出标题行。将打印存档名称、实际大小(以字节为单位)和文件总数。
-M 通过类似于更多命令的内部寻呼机管道所有输出。在输出屏幕的末尾,zipinfo暂停一个"-more-"提示;可以通过按"输入(返回)"键或空格键来查看下一个屏幕。zipinfo可以通过按q键终止,在某些系统上,也可以按 Enter/返回键来终止。与更多不同,没有前瞻搜索或编辑功能。此外,zipinfo不会注意到长行是否环绕在屏幕边缘,从而有效地打印了两行或多行,并且某些文本在查看之前可能会从屏幕顶部滚动下来。在某些系统上,未检测到屏幕上的可用行数,在这种情况下,zipinfo假定高度为 24 行。
- t 列出列出的文件或所有文件的总计。打印列出的文件数、未压缩和压缩的总大小以及整体压缩系数;或者,如果仅打印总计行,则给出整个存档的值。压缩的总大小不包括每个加密条目的 12 个附加标头字节。请注意,总压缩(数据)大小将永远不会与实际 zipfile 大小匹配,因为后者包括除压缩数据之外的所有内部 zipfile 标头。
- t 以可排序的十进制格式(yymmd.hhmms) 打印文件日期和时间。默认日期格式是具有缩写月份名称的更标准、更人性化可读的版本。
- U 修改或禁用 UTF-8 处理。当UNICODE_SUPPORT时,选项-U强制解压缩以将 UTF-8 编码文件名中的所有非 ASCII 字符转义为"#Uxxxx"。此选项主要用于调试目的,当怀疑有相当新的 UTF-8 支持来清理提取的文件名时。

-UU允许完全禁用 UTF-8 编码文件名的
识别。在解压缩中处理文件名编码可追溯到以前版本的行为。
- z 在列表中包括存档注释(如果有)。

技术细节

zipinfo有许多模式,如果不熟悉Unix ls,它的行为可能相当难以理解。默认行为是以以下格式列出文件:

-rw-rws--- 1.9 unx 2802 t- defX 11-Aug-91 13:48 perms.2660

最后三个字段是文件的修改日期和时间及其名称。文件名的大小写得到尊重;因此,来自 MS-DOS PKZIP 的文件始终大写。如果文件使用存储的目录名压缩,则该文件也将显示为文件名的一部分。

第二个和第三个字段表示文件在 Unix 下压缩了 zip的版本 1.9 由于它来自 Unix,因此行开头的文件权限以 Unix 格式打印。未压缩的文件大小(本例中为 2802)是第四个字段。第五个字段由两个字符组成,其中一个可以包含多个值。第一个字符可以是[t][b],表示zip认为文件分别是文本或二进制文件。如果文件已加密,zipinfo会通过大写字符("T""B")来记录这事实。第二个字符还可以包含四个值,具体取决于是否有扩展的本地标头或与文件关联的"额外字段"(它们提供了在存档中包含非标准信息的标准方法)。如果两者都不存在,则字符将是连字符 ("-");如果有一个扩展的本地标头,但没有额外的字段,"l";如果相反,[x];如果两者都存在,[X]。因此,此示例中的文件(可能)是文本文件,未加密,并且既没有额外的字段,也没有与之关联的扩展本地标头。另一方面,下面的示例是一个加密的二进制文件,具有额外的字段:

RWD,R,R 0.9 vms 168 Bx shrk 9-Aug-91 19:15 perms.0644

额外的字段用于各种目的(请参阅下面的-v选项的讨论),包括 VMS 文件属性的存储,这里大概就是这种情况。这些文件属性以 VMS 格式列出。主机操作系统的一些其他可能性(这实际上是一个用词不当的主机文件系统更正确)包括OS/2或NT与高性能文件系统(HPFS),MS-DOS,OS/2或NT文件分配表(FAT)文件系统,和Macintosh。 这些表示如下:

-rw-a--     1.0 hpf    5358 Tl i4:3  4-Dec-91 11:33 longfilename.hpfs
-r--ahs     1.1 fat    4096 b- i4:2 14-Jul-91 12:58 EA DATA. SF
--w-------  1.0 mac   17357 bx i8:2  4-May-92 04:02 unzip.macr

前两种情况下的文件属性以一种与 Unix 一样表示的格式,其中七个子字段指示文件是否:

  •  是一个目录, 
  •  是可读的(始终为真), 
  •  是可写, 
  •  是可执行的(根据扩展确定;.exe、.com、.bat、.cmd.btm文件假定为如此), 
  •  设置存档位, 
  •  是隐藏的,和 
  •  是一个系统文件。Macintosh 文件属性的解释不可靠,因为某些 Macintosh 存档副本不会将任何属性存储在存档中。

最后,第六个字段指示压缩方法和可能的子方法。目前有六种已知方法:存储(无压缩)、减少、收缩、内爆、标记化(从未公开发布)和放气。此外,有四个级别的减少(1到4);四种类型的内爆(4K或8K滑动字典,和2或3香农-法诺树);和四个级别的放气(超快,快,正常,最大压缩)。zipinfo表示这些方法及其子方法如下: stor;re:1、re:2 等;shrk;i4:2,i8:3 等;tokn;和 defs, deff, defn 和 defx 。

中长列表几乎与短格式相同,只是它们增加了有关文件压缩的信息。中等格式将文件的压缩系数列出为指示已"删除"的空间量的百分比:

-rw-rws--- 1.5 unx 2802 t- 81% defX 11-Aug-91 13:48 perms.2660

在此示例中,文件压缩了五分之一多;压缩数据只有原始大小的 19%。长格式以字节为单位提供压缩文件的大小,而不是:

-rw-rws--- 1.5 unx 2802 t- 538 defX 11-Aug-91 13:48 perms.2660

与解压缩列表不同,此列表格式中的压缩大小表示压缩数据的完整大小,包括加密条目的 12 个额外的标头字节。

添加-T 选项会将文件日期和时间更改为十进制格式:

-rw-rws--- 1.5 unx 2802 t- 538 defX 910811.134804 perms.2660

请注意,由于用于存储文件时间的 MS-DOS 格式的限制,秒字段始终四舍五入到最接近的甚至秒。对于 Unix 文件,这预计将改变在 zip 和解压缩的下一个主要版本

除了单个文件信息外,默认 zipfile 列表还包括标题行和尾部行:

Archive:  OS2.zip   5453 bytes   5 files
,,rw, 1.0 hpf     730 b- i4:3 26-Jun-92 23:40 Contents
,,rw, 1.0 hpf    3710 b- i4:3 26-Jun-92 23:33 makefile.os2
,,rw, 1.0 hpf    8753 b- i8:3 26-Jun-92 15:29 os2unzip.c
,,rw, 1.0 hpf      98 b- stor 21-Aug-91 15:34 unzip.def
,,rw, 1.0 hpf      95 b- stor 21-Aug-91 17:51 zipinfo.def
5 files, 13386 bytes uncompressed, 4951 bytes compressed:  63.0%

标题行提供存档的名称、总大小和文件总数;预告片提供列出的文件数、它们的总未压缩大小及其总压缩大小(不包括任何 zip 的内部开销)。但是,如果提供了一个或多个文件,则不会列出标题行和尾部行。这种行为也类似于Unix的"ls-l";可以通过显式指定-h-t 选项来覆盖它。在这种情况下,还必须显式指定列表格式,因为在没有其他选项的情况下,-h-t(或两者)意味着仅列出标题或尾部行(或两者)。

冗长的清单大多不言自明。它还列出文件注释和 zipfile 注释(如果有)以及任何存储的额外字段中的字节类型和数量。目前已知的额外字段类型包括 PKWARE 的身份验证 ("AV") 信息;OS/2 扩展属性;VMS 文件系统信息,包括 PKWARE 和信息 ZIP 版本;麦金托什资源叉;橡子/阿基米德火花信息;等等。(请注意,在 OS/2 扩展属性(可能是 zipfile 额外字段的最常见用途);zipinfo 报告的存储 EA 的大小可能与 OS/2 的 dir 命令给出的数字不匹配:OS/2 始终以16 位格式报告所需的字节数,而 zipinfo 始终报告32 位存储。

同样,各个条目的压缩大小数字包括加密条目的 12 个额外的头字节。相比之下,在计算未额外 12 个头字节的加密条目的情况下,计算摘要底线中显示的存档总压缩大小和平均压缩比。

环境选项

通过放置在环境变量中的选项修改zipinfo的默认行为可能有点复杂,因为 zipinfo尝试以直观但与 Unix 一样的方式处理各种默认值。然而,有一些基本的逻辑。简言之,选项有三个"优先级":默认选项;默认选项。默认选项,默认环境选项,可以覆盖或添加到默认值;和用户给出的显式选项,这些选项可以覆盖或添加到上述任一选项中。

如上所述,默认列表格式大致对应于"zipinfo -hst"命令(指定了单独的 zipfile 成员时除外)。喜欢长列表格式 (-l) 的用户可以使用 zipinfo 的环境变量使用以下方法更改此默认值:

在 Unix伯恩壳:

ZIPINFO=-l; export ZIPINFO

在 Unix C 外壳中:

setenv ZIPINFO -l

在 OS/2 或 MS-DOS 中:

set ZIPINFO=-l

在 VMS 中(小写的报价):

define ZIPINFO_OPTS "-l"

此外,如果用户不喜欢拖车行,zipinfo的"负面选项"概念可用于覆盖该行的默认包含。这是通过前面的一个或多个减号不需要的选项来完成的:例如,在此示例中的"-l-t""--tl"。第一个连字符是常规开关字符,但[t]之前是一个减号。连字符的双重用途可能看起来有点尴尬,但它还是相当直观:忽略第一个连字符,然后从那里开始。它也与Unix命令尼斯的行为一致。

如上文所示,VMS 的默认变量名称为 ZIPINFO_OPTS(用于将zipinfo安装为外国命令的符号将与环境变量混淆),并且所有其他操作系统的 ZIPINFO为 ZIPINFO_OPTS。为了与 zip兼容,也接受 ZIPINFOOPT。但是,如果定义了 ZIPINFO 和 ZIPINFOOPT,则 ZIPINFO 优先。解压缩的诊断选项(-v没有 zipfile 名称)可用于检查所有四个可能的unzip和 zipinfo 环境变量的值。


zipinfo [-12smlvhMtTz] file[.zip] [file(s) ...] [-x xfile(s) ...]

Arguments

The zipinfo command takes the following arguments:

file[.zip] Path of the zip archive(s). If the file specification is a wildcard, each matching file is processed in an order determined by the operating system (or file system). Only the file name can be a wildcard; the path itself cannot. Wildcard expressions are similar to Unix egrep regular expressions, and may contain:

* matches a sequence of 0 or more characters.
? matches exactly 1 character.
[...] matches any single character found inside the brackets; ranges are specified by a beginning character, a hyphen, and an ending character. If an exclamation point or a caret ("!" or "^") follows the left bracket, then the range of characters within the brackets is complemented (that is, anything except the characters inside the brackets is considered a match). To specify a verbatim left bracket, the three-character sequence "[[]" has to be used.
(Be sure to quote any character that might otherwise be interpreted or modified by the operating system, particularly under Unix and VMS.) If no matches are found, the specification is assumed to be a literal file name; and if that also fails, the suffix .zip is appended. Note that self-extracting zip files are supported, as with any other zip archive; just specify the .exe suffix (if any) explicitly.
file ... An optional list of archive members to be processed, separated by spaces. Regular expressions or wildcards may be used to match multiple members; see above. Again, be sure to quote expressions that would otherwise be expanded or modified by the operating system.
-x xfile ... An optional list of archive members to be excluded from processing.

Options

-1 List file names only, one per line. This option excludes all others; headers, trailers and zipfile comments are never printed. It is intended for use in Unix shell scripts.
-2 List file names only, one per line, but allow headers (-h), trailers (-t) and zipfile comments (-z), as well. This option may be useful in cases where the stored file names are particularly long.
-s List zipfile info in short Unix "ls -l" format. This is the default behavior.
-m List zipfile info in medium Unix "ls -l" format. Identical to the -s output, except that the compression factor, expressed as a percentage, is also listed.
-l List zipfile info in long Unix "ls -l" format. As with -m except that the compressed size (in bytes) is printed instead of the compression ratio.
-v List zipfile information in verbose, multi-page format.
-h List header line. The archive name, actual size (in bytes) and total number of files is printed.
-M Pipe all output through an internal pager similar to the more command. At the end of a screenful of output, zipinfo pauses with a "--More--" prompt; the next screenful may be viewed by pressing the Enter (Return) key or the spacebar. zipinfo can be terminated by pressing the q key and, on some systems, the Enter/Return key. Unlike more, there is no forward-searching or editing capability. Also, zipinfo doesn't notice if long lines wrap at the edge of the screen, effectively resulting in the printing of two or more lines and the likelihood that some text will scroll off the top of the screen before being viewed. On some systems the number of available lines on the screen is not detected, in which case zipinfo assumes the height is 24 lines.
-t List totals for files listed or for all files. The number of files listed, their uncompressed and compressed total sizes, and their overall compression factor is printed; or, if only the totals line is being printed, the values for the entire archive are given. The compressed total size does not include the 12 additional header bytes of each encrypted entry. Note that the total compressed (data) size will never match the actual zipfile size, since the latter includes all of the internal zipfile headers in addition to the compressed data.
-T Print the file dates and times in a sortable decimal format (yymmdd.hhmmss). The default date format is a more standard, human-readable version with abbreviated month names.
-U Modify or disable UTF-8 handling. When UNICODE_SUPPORT is available, the option -U forces unzip to escape all non-ASCII characters from UTF-8 coded file names as "#Uxxxx". This option is mainly provided for debugging purpose when the fairly new UTF-8 support is suspected to mangle up extracted file names.

The option -UU allows to entirely disable the recognition of UTF-8 encoded file names. The handling of file name codings within unzip falls back to the behaviour of previous versions.
-z Include the archive comment (if any) in the listing.

Technical Details

zipinfo has a number of modes, and its behavior can be rather difficult to fathom if one isn't familiar with Unix ls. The default behavior is to list files in the following format:

-rw-rws--- 1.9 unx 2802 t- defX 11-Aug-91 13:48 perms.2660

The last three fields are the modification date and time of the file, and its name. The case of the file name is respected; thus files that come from MS-DOS PKZIP are always capitalized. If the file was zipped with a stored directory name, that is also displayed as part of the file name.

The second and third fields indicate that the file was zipped under Unix with version 1.9 of zip. Since it comes from Unix, the file permissions at the beginning of the line are printed in Unix format. The uncompressed file-size (2802 in this example) is the fourth field. The fifth field consists of two characters, either of which may take on several values. The first character may be either "t" or "b", indicating that zip believes the file to be text or binary, respectively. If the file is encrypted, zipinfo notes this fact by capitalizing the character ("T" or "B"). The second character may also take on four values, depending on whether there is an extended local header or an "extra field" associated with the file (they provide a standard way to include non-standard information in the archive). If neither exists, the character will be a hyphen ("-"); if there is an extended local header but no extra field, "l"; if the reverse, "x"; and if both exist, "X". Thus the file in this example is (probably) a text file, is not encrypted, and has neither an extra field nor an extended local header associated with it. The example below, on the other hand, is an encrypted binary file with an extra field:

RWD,R,R 0.9 vms 168 Bx shrk 9-Aug-91 19:15 perms.0644

Extra fields are used for various purposes (see discussion of the -v option below) including the storage of VMS file attributes, which is presumably the case here. These file attributes are listed in VMS format. Some other possibilities for the host operating system (which is actually a misnomer--host file system is more correct) include OS/2 or NT with High Performance File System (HPFS), MS-DOSOS/2 or NT with File Allocation Table (FAT) file system, and Macintosh. These are denoted as follows:

-rw-a--     1.0 hpf    5358 Tl i4:3  4-Dec-91 11:33 longfilename.hpfs
-r--ahs     1.1 fat    4096 b- i4:2 14-Jul-91 12:58 EA DATA. SF
--w-------  1.0 mac   17357 bx i8:2  4-May-92 04:02 unzip.macr

File attributes in the first two cases are indicated in a Unix-like format, where the seven subfields indicate whether the file:

  •  is a directory
  •  is readable (always true), 
  •  is writable, 
  •  is executable (guessed on the basis of the extension; .exe.com.bat.cmd and .btm files are assumed to be so), 
  •  has its archive bit set, 
  •  is hidden, and 
  •  is a system file. Interpretation of Macintosh file attributes is unreliable because some Macintosh archivers don't store any attributes in the archive.

Finally, the sixth field indicates the compression method and possible sub-method used. There are six methods known at present: storing (no compression), reducing, shrinking, imploding, tokenizing (never publicly released), and deflating. Also, there are four levels of reducing (1 through 4); four types of imploding (4K or 8K sliding dictionary, and 2 or 3 Shannon-Fano trees); and four levels of deflating (super fast, fast, normal, maximum compression). zipinfo represents these methods and their sub-methods as follows: stor; re:1, re:2, etc.; shrk; i4:2, i8:3, etc.; tokn; and defS, defF, defN, and defX.

The medium and long listings are almost identical to the short format except that they add information on the file's compression. The medium format lists the file's compression factor as a percentage indicating the amount of space that has been "removed":

-rw-rws--- 1.5 unx 2802 t- 81% defX 11-Aug-91 13:48 perms.2660

In this example, the file has been compressed by more than a factor of five; the compressed data are only 19% of the original size. The long format gives the compressed file's size in bytes, instead:

-rw-rws--- 1.5 unx 2802 t- 538 defX 11-Aug-91 13:48 perms.2660

In contrast to the unzip listings, the compressed size figures in this listing format denote the complete size of compressed data, including the 12 extra header bytes in case of encrypted entries.

Adding the -T option changes the file date and time to decimal format:

-rw-rws--- 1.5 unx 2802 t- 538 defX 910811.134804 perms.2660

Note that because of limitations in the MS-DOS format used to store file times, the seconds field is always rounded to the nearest even second. For Unix files this is expected to change in the next major releases of zip and unzip.

In addition to individual file information, a default zipfile listing also includes header and trailer lines:

Archive:  OS2.zip   5453 bytes   5 files
,,rw, 1.0 hpf     730 b- i4:3 26-Jun-92 23:40 Contents
,,rw, 1.0 hpf    3710 b- i4:3 26-Jun-92 23:33 makefile.os2
,,rw, 1.0 hpf    8753 b- i8:3 26-Jun-92 15:29 os2unzip.c
,,rw, 1.0 hpf      98 b- stor 21-Aug-91 15:34 unzip.def
,,rw, 1.0 hpf      95 b- stor 21-Aug-91 17:51 zipinfo.def
5 files, 13386 bytes uncompressed, 4951 bytes compressed:  63.0%

The header line gives the name of the archive, its total size, and the total number of files; the trailer gives the number of files listed, their total uncompressed size, and their total compressed size (not including any of zip's internal overhead). If, however, one or more file(s) are provided, the header and trailer lines are not listed. This behavior is also similar to that of Unix's "ls -l"; it may be overridden by specifying the -h and -t options explicitly. In such a case the listing format must also be specified explicitly, since -h or -t (or both) in the absence of other options implies that ONLY the header or trailer line (or both) is listed.

The verbose listing is mostly self-explanatory. It also lists file comments and the zipfile comment, if any, and the type and number of bytes in any stored extra fields. Currently known types of extra fields include PKWARE's authentication ("AV") info; OS/2 extended attributes; VMS filesystem info, both PKWARE and Info-ZIP versions; Macintosh resource forks; Acorn/Archimedes SparkFS info; and so on. (Note that in the case of OS/2 extended attributes (perhaps the most common use of zipfile extra fields); the size of the stored EAs as reported by zipinfo may not match the number given by OS/2's dir command: OS/2 always reports the number of bytes required in 16-bit format, whereas zipinfo always reports the 32-bit storage.)

Again, the compressed size figures of the individual entries include the 12 extra header bytes for encrypted entries. In contrast, the archive total compressed size and the average compression ratio shown in the summary bottom line are calculated without the extra 12 header bytes of encrypted entries.

Environment Options

Modifying zipinfo's default behavior via options placed in an environment variable can be a bit complicated to explain, due to zipinfo's attempts to handle various defaults in an intuitive, yet Unix-like, manner. Nevertheless, there is some underlying logic. In brief, there are three "priority levels" of options: the default options; environment options, which can override or add to the defaults; and explicit options given by the user, which can override or add to either of the above.

The default listing format, as noted above, corresponds roughly to the "zipinfo -hst" command (except when individual zipfile members are specified). A user who prefers the long-listing format (-l) can make use of the zipinfo's environment variable to change this default using the following methods:

in Unix Bourne shell:

ZIPINFO=-l; export ZIPINFO

in Unix C shell:

setenv ZIPINFO -l

in OS/2 or MS-DOS:

set ZIPINFO=-l

in VMS (quotes for lowercase):

define ZIPINFO_OPTS "-l"

If, in addition, the user dislikes the trailer line, zipinfo's concept of "negative options" may be used to override the default inclusion of the line. This is accomplished by preceding the undesired option with one or more minuses: e.g., "-l-t" or "--tl", in this example. The first hyphen is the regular switch character, but the one before the "t" is a minus sign. The dual use of hyphens may seem a little awkward, but it's reasonably intuitive nonetheless: ignore the first hyphen and go from there. It is also consistent with the behavior of the Unix command nice.

As suggested above, the default variable names are ZIPINFO_OPTS for VMS (where the symbol used to install zipinfo as a foreign command would otherwise be confused with the environment variable), and ZIPINFO for all other operating systems. For compatibility with zipZIPINFOOPT is also accepted. If both ZIPINFO and ZIPINFOOPT are defined, however, ZIPINFO takes precedence. unzip's diagnostic option (-v with no zipfile name) can be used to check the values of all four possible unzip and zipinfo environment variables.

查看英文版

查看中文版

zipinfo 例子

zipinfo hope

显示有关存档hope.zip。输出将类似于以下内容:

Archive: hope.zip 9628445 bytes 25 files
-rw-r--r-- 2.3 unx    282667  tx  defN  18-Jul-11 14:17 badips.txt
-rw-r--r-- 2.3 unx  46177980  tx  defN  18-Jul-11 04:45 hijacklogs.txt
-rw-r--r-- 2.3 unx    231984  tx  defN  18-Jul-11 13:01 isitup.txt
.
.
.
25 files, 60757943 bytes uncompressed, 9625041 bytes compressed: 84.2%
zipinfo hope

Display information about the archive hope.zip. Output will resemble the following:

Archive: hope.zip 9628445 bytes 25 files
-rw-r--r-- 2.3 unx    282667  tx  defN  18-Jul-11 14:17 badips.txt
-rw-r--r-- 2.3 unx  46177980  tx  defN  18-Jul-11 04:45 hijacklogs.txt
-rw-r--r-- 2.3 unx    231984  tx  defN  18-Jul-11 13:01 isitup.txt
.
.
.
25 files, 60757943 bytes uncompressed, 9625041 bytes compressed: 84.2%

查看英文版

查看中文版

发表评论
评论列表
共0条
点击加载更多