|
|
1.1 root 1: .de X
2: .nf
3: .ien .ti -5
4: .el \{ .ti +2m
5: .ps -1 \}
6: \&\\$1
7: .ien .ti +5
8: .el \{ .ti -2m
9: .ps +1 \}
10: .fi
11: ..
12: .TH ZIPINFO 1 "19 Aug 92 (v1.0)"
13: .SH NAME
14: zipinfo \- list detailed information about a ZIP archive file
15: .SH SYNOPSIS
16: \fBzipinfo\fP [\-\fB1smlvht\fP] \fRfile\fP[\fR.zip\fP] [\fRfilespec\fP\ ...]
17: .SH ARGUMENTS
18: .IP \fIfile\fP[\fI.zip\fP] \w'[\fIfilespec\fP]'u+2m
19: Path of the ZIP archive. The suffix ``\fR.zip\fP'' is applied
20: if the \fRfile\fP specified does not exist. Note that
21: self-extracting ZIP files are supported; just specify
22: the ``\fR.exe\fP'' suffix yourself.
23: .IP [\fIfilespec\fP]
24: An optional list of archive members to be processed.
25: Expressions may be used to match multiple members; be sure to quote
26: expressions that contain characters interpreted by the Unix shell. See
27: PATTERN MATCHING (below) for more details.
28: .SH OPTIONS
29: .PD 0
30: .IP \-1 \w'\-1'u+2m
31: list filenames only, one per line (useful for pipes)
32: .IP \-s
33: list zipfile info in short Unix ``ls \-l'' format: default
34: .IP \-m
35: list zipfile info in medium Unix ``ls \-l'' format
36: .IP \-l
37: list zipfile info in long Unix ``ls \-l'' format
38: .IP \-v
39: list zipfile information in verbose, multi-page format
40: .IP \-h
41: list header line
42: .IP \-t
43: list totals for files listed or for all files
44: .PD
45: .SH PATTERN MATCHING
46: All archive members are listed unless a \fIfilespec\fP is provided to
47: specify a subset of the archive members. The \fIfilespec\fP is similar
48: to an \fRegrep\fP expression, and may contain:
49: .PP
50: .ta \w'[...]'u+2m
51: * matches a sequence of 0 or more characters
52: .br
53: ? matches exactly 1 character
54: .br
55: \\nnn matches the character having octal code nnn
56: .PD 0
57: .IP [...] \w'[...]'u+2m
58: matches any single character found inside the brackets; ranges
59: are specified by a beginning character, a hyphen, and an ending
60: character. If an exclamation point or a carat (`!' or `^') follows
61: the left bracket, then the range of characters matched is complemented
62: with respect to the ASCII character set (that is, anything except the
63: characters inside the brackets is considered a match).
64: .PD
65: .SH DESCRIPTION
66: .I ZipInfo
67: lists technical information about a ZIP archive, including information
68: file access permissions, encryption status, type of compression, version
69: and operating system of compressing program, and the like. The default
70: option is to list files in the following format:
71: .PP
72: .X "-rw-rwl--- 1.5 unx 2802 t- defX 11-Aug-91 13:48 perms.2660"
73: .PP
74: The last three fields are clearly the modification date and time of
75: the file, and its name. The case of the filename is respected; thus
76: files which come from MS-DOS PKZIP are always capitalized. If the file
77: was zipped with a stored directory name, that is also displayed as part
78: of the filename.
79: .PP
80: The second and third fields indicate that the file was zipped under
81: Unix with version 1.5 of \fRZip\fP (a beta version). Since it comes
82: from Unix, the file
83: permissions at the beginning of the line are printed in Unix format.
84: The uncompressed file-size (2802 in this example) is the fourth field.
85: .PP
86: The fifth field consists of two characters, either of which may take
87: on several values. The first character may be either `t' or `b', indicating
88: that \fRZip\fP believes the file to be text or binary, respectively;
89: but if the file is encrypted, \fIZipInfo\fP
90: notes this fact by capitalizing the character (`T' or `B'). The second
91: character may also take on four values, depending on whether there is
92: an extended local header and/or an ``extra field'' associated with the
93: file (explained in PKWare's APPNOTE.TXT). If neither exists, the character
94: will be a hyphen (`\-'); if there is an extended local header but no extra
95: field, `l'; if the reverse, `x'; and if both exist, `X'. Thus the
96: file in this example is (apparently) a text file, is not encrypted, and
97: has neither an extra field nor an extended local header associated with it.
98: The example below, on the other hand, is an encrypted binary file with an
99: extra field:
100: .PP
101: .X "RWD,R,R 0.9 vms 168 Bx shrk 9-Aug-91 19:15 perms.0644"
102: .PP
103: Extra fields are used by PKWare for authenticity verification(?) and
104: possibly other purposes, and by Info-ZIP's \fRZip\fP
105: 1.6 and later to store OS/2, Macintosh and VMS file attributes.
106: This example presumably falls into
107: the latter class, then. Note that the file attributes are listed in
108: VMS format. Other possibilities for the host operating system include
109: OS/2 with High Performance File System (HPFS), DOS or OS/2 with File
110: Allocation Table (FAT) file system, and Macintosh, denoted
111: as follows:
112: .PP
113: .X "arc,,rw, 1.0 os2 5358 Tl i4:3 4-Dec-91 11:33 longfilename.hpfs"
114: .X "arc,hid,rdo,sys dos 4096 b- i4:2 14-Jul-91 12:58 EA DATA. SF"
115: .X "--w------- 1.0 mac 17357 bx i8:2 4-May-92 04:02 unzip.macr"
116: .PP
117: File attributes in the first two cases are indicated in a DOS-like format,
118: where the file may or may not have its archive bit set; may be hidden or not;
119: may be read-write or read-only; and may be a system file or not. If the
120: attributes are too long, the version number of the encoding software is
121: omitted. (The information is still available in the verbose listing,
122: however.) Interpretation of Macintosh file attributes needs some work yet.
123: .PP
124: Finally, the sixth field indicates
125: the compression method and possible sub-method used. There are six methods
126: known at present: storing (no compression), reducing, shrinking, imploding,
127: tokenizing, and deflating. In addition, there are four levels of reducing
128: (1 through 4); four types of imploding (4K or 8K sliding dictionary, and
129: 2 or 3 Shannon-Fano trees); and three levels of deflating (fast, normal,
130: maximum compression). \fIZipInfo\fP represents these methods and their
131: sub-methods as follows: ``stor''; ``re:1,'' ``re:2,'' etc.; ``shrk'';
132: ``i4:2,'' ``i8:3,'' etc.; ``tokn''; and ``defF,'' ``defN,'' and ``defX.''
133: .PP
134: The medium and long listings are almost identical to the
135: short format except that they add information on the file's
136: compression. The medium format indicates the file's
137: compression factor as a percentage:
138: .PP
139: .X "-rw-rwl--- 1.5 unx 2802 t- 81% defX 11-Aug-91 13:48 perms.2660"
140: .PP
141: In this example, the file has been compressed by more than a factor of
142: five; the compressed data are only 19% of the original size. The long
143: format gives the compressed file's size in bytes, instead:
144: .PP
145: .X "-rw-rwl--- 1.5 unx 2802 t- 538 defX 11-Aug-91 13:48 perms.2660"
146: .PP
147: In addition to individual file information, a default zipfile listing
148: also includes header and trailer lines:
149: .PP
150: .X "Archive: OS2.zip 5453 bytes 5 files"
151: .X ",,rw, 1.0 os2 730 b- i4:3 26-Jun-92 23:40 Contents"
152: .X ",,rw, 1.0 os2 3710 b- i4:3 26-Jun-92 23:33 makefile.os2"
153: .X ",,rw, 1.0 os2 8753 b- i8:3 26-Jun-92 15:29 os2unzip.c"
154: .X ",,rw, 1.0 os2 98 b- stor 21-Aug-91 15:34 unzip.def"
155: .X ",,rw, 1.0 os2 95 b- stor 21-Aug-91 17:51 zipinfo.def"
156: .X "5 files, 13386 bytes uncompressed, 4951 bytes compressed: 63%"
157: .PP
158: The header line gives the name of the archive, its total size, and the
159: total number of files; the trailer gives the number of files listed,
160: their total uncompressed size, and their total compressed size (not
161: including any of \fRZip\fP's internal overhead). If, however, one or
162: more \fIfilespec\fPs are provided, the header and trailer lines are
163: not listed. This behavior is also similar to that of Unix's ``ls \-l'';
164: it may be overridden by specifying the \-h and \-t options explicitly.
165: In such a case the listing format must also be specified explicitly,
166: since \-h or \-t (or both) in the absence of other options implies
167: that ONLY the header or trailer line (or both) is listed. See the
168: EXAMPLES section below for a semi-intelligible translation of this
169: nonsense.
170: .PP
171: The verbose listing is self-explanatory. It also lists file
172: comments and the zipfile comment, if any, and the number of
173: bytes of OS/2 extended attributes stored. Note that the
174: latter number will in general NOT match the number given by
175: OS/2's ``dir'' command; OS/2 always reports the number of
176: bytes required in 16-bit format, whereas \fIZipInfo\fP
177: always reports the 32-bit storage.
178: .PD
179: .SH ENVIRONMENT OPTIONS
180: Modifying \fIZipInfo\fP's default behavior via options placed in
181: an environment variable can be a bit complicated to explain, due to
182: \fIZipInfo\fP's attempts to handle various defaults in an intuitive,
183: yet Unix-like, manner. Nevertheless, there is some underlying logic.
184: In brief,
185: there are three ``priority levels'' of options: the default options;
186: environment options, which can override or add to the defaults; and
187: explicit options given by the user, which can override or add to
188: either of the above.
189: .PP
190: The default listing format, as noted above, corresponds roughly
191: to the "zipinfo \-hst" command (except when individual zipfile members
192: are specified).
193: A user who prefers the long-listing format (\-l) can make use of the
194: \fIZIPINFO\fP environment variable to change this default:
195: .ta \w'tabset'u +\w'ZIPINFO=\-l; export ZIPINFO'u+3m
196: .PP
197: .IP "\tsetenv ZIPINFO \-l\tUnix C shell"
198: .br
199: .IP "\tZIPINFO=\-l; export ZIPINFO\tUnix Bourne shell"
200: .PP
201: .IP "\tset ZIPINFO=\-l\tOS/2 or MS-DOS"
202: .PP
203: .IP "\tdefine ZIPINFO_OPTS ""\-l""\tVMS (quotes for LOWERCASE)"
204: .PP
205: If, in addition, the user dislikes the trailer line, \fIZipInfo\fP's
206: concept of ``negative options'' may be used to override the default
207: inclusion of the line. This is accomplished by preceding the undesired
208: option with one or more minuses: e.g., ``\-l\-t'' or ``\-\-tl'', in this
209: example. The first hyphen is the regular switch character, but the one
210: before the `t' is a minus sign. The dual use of hyphens may seem a little
211: awkward, but it's reasonably intuitive nonetheless: simply ignore the
212: first hyphen and go from there. It is also consistent with the behavior
213: of the Unix command \fRnice\fP(1).
214: .PD
215: .SH EXAMPLES
216: To get a basic, short-format listing of the complete contents of a ZIP
217: archive ``storage.zip,'' with both header and totals lines, use only
218: the archive name as an argument to zipinfo:
219: .PP
220: .IP "\t\fIzipinfo\fP storage"
221: .PP
222: To produce a basic, long-format listing (not verbose), including header and
223: totals lines, use \-l:
224: .PP
225: .IP "\t\fIzipinfo\fP \-l storage"
226: .PP
227: To list the complete contents of the archive without header and totals
228: lines, either negate the \-h and \-t options or else specify the contents
229: explicitly:
230: .PP
231: .IP "\t\fIzipinfo\fP \-\-h\-t storage"
232: .IP "\t\fIzipinfo\fP storage \e*"
233: .PP
234: (where the backslash is required only if the shell would otherwise expand
235: the `*' wildcard, as in Unix when globbing is turned on--double quotes around
236: the asterisk would have worked as well). To turn off the totals line by
237: default, use the environment variable (C shell is assumed here):
238: .PP
239: .IP "\tsetenv ZIPINFO \-\-t"
240: .IP "\t\fIzipinfo\fP storage"
241: .PP
242: To get the full, short-format listing of the first example again, given
243: that the environment variable is set as in the previous example, it is
244: necessary to specify the \-s option explicitly, since the \-t
245: option by itself implies that ONLY the footer line is to be printed:
246: .PP
247: .IP "\tsetenv ZIPINFO \-\-t"
248: .IP "\t\fIzipinfo\fP \-t storage\t[only totals line]"
249: .IP "\t\fIzipinfo\fP \-st storage\t[full listing]"
250: .PP
251: The \-s option, like \-m and \-l, includes headers and footers by default,
252: unless otherwise specified. Since the environment variable specified no
253: footers and that has a higher precedence than the default behavior of \-s,
254: an explicit \-t option was necessary to produce the full listing. Nothing
255: was indicated about the header, however, so the \-s option was sufficient.
256: Note that both the \-h and \-t options, when used by themselves or with
257: each other, override any default listing of member files; only the header
258: and/or footer are printed. This behavior will be more
259: useful when \fIZipInfo\fP accepts wildcards for the zipfile name; one
260: may then summarize the contents of all zipfiles with a single command.
261: .PP
262: To list information on a single file within the archive, in medium format,
263: specify the filename explicitly:
264: .PP
265: .IP "\t\fIzipinfo\fP \-m storage unshrink.c"
266: .PP
267: The specification of any member file, as in this example, will override
268: the default header and totals lines; only the single line of information
269: about the requested file will be printed. This is intuitively what one
270: would expect when requesting information about a single file. For multiple
271: files, it is often useful to know the total compressed and uncompressed
272: size; in such cases \-t may be specified explicitly:
273: .PP
274: .IP "\t\fIzipinfo\fP \-mt storage ""*.[ch] Mak\e*"
275: .PP
276: Finally, to get maximal information about the ZIP archive, use the verbose
277: option. It is usually wise to pipe the output into a filter such as
278: \fRmore\fP(1):
279: .PP
280: .IP "\t\fIzipinfo\fP \-v storage | more"
281: .PD
282: .SH TIPS
283: The author finds it convenient to set up an alias ``ii'' for \fIZipInfo\fP
284: on systems which allow aliases, or else to set up a batch file ``ii.bat''
285: or to rename the executable to ``ii.exe'' on systems such as MS-DOS which
286: have no provision for aliases. The ``ii'' usage parallels the common
287: ``ll'' alias for long listings in Unix, and the similarity between the
288: outputs of the two commands was intentional.
289: .PD
290: .SH SEE ALSO
291: funzip(1), unzip(1), zip(1), zipcloak(1), zipnote(1), zipsplit(1)
292: .PD
293: .SH AUTHOR
294: Greg Roelofs (also known as Cave Newt). \fIZipInfo\fP is partly based on
295: S. H. Smith's \fRunzip\fP and contains pattern-matching code by J. Kercheval,
296: but mostly it was written from scratch. The OS/2 extra-field code is by
297: Kai Uwe Rommel.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.