


     ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111LLLL))))       XXXXEEEENNNNIIIIXXXX 3333....0000 ((((22228888 AAAAuuuugggg 99994444 ((((vvvv2222....00002222))))))))	   ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111LLLL))))



     NNNNAAAAMMMMEEEE
	  zipinfo - list detailed information about a ZIP archive

     SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
	  zzzziiiippppiiiinnnnffffoooo [----11112222ssssmmmmllllvvvvhhhhttttTTTTzzzz]	_f_i_l_e[._z_i_p] [_f_i_l_e(_s) ...]
	  [----xxxx _x_f_i_l_e(_s) ...]

	  uuuunnnnzzzziiiipppp	----ZZZZ [----11112222ssssmmmmllllvvvvhhhhttttTTTTzzzz] _f_i_l_e[._z_i_p] [_f_i_l_e(_s) ...]
	  [----xxxx _x_f_i_l_e(_s) ...]

     DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
	  _z_i_p_i_n_f_o 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, and the like.  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.	See DDDDEEEETTTTAAAAIIIILLLLEEEEDDDD DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN below.	 Note
	  that _z_i_p_i_n_f_o is the same program as _u_n_z_i_p (under Unix, a
	  link to it); on some systems,	however, _z_i_p_i_n_f_o support may
	  have been omitted when _u_n_z_i_p was compiled.

     AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
	  _f_i_l_e[._z_i_p]
	       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 filename can be a wildcard; the path
	       itself cannot.  Wildcard	expressions are	similar	to
	       Unix _e_g_r_e_p(1) (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 _e_x_c_e_p_t the characters inside
		    the	brackets is considered a match).

	       (Be sure	to quote any character which 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



     Page 1					     (printed 3/25/95)






     ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111LLLL))))       XXXXEEEENNNNIIIIXXXX 3333....0000 ((((22228888 AAAAuuuugggg 99994444 ((((vvvv2222....00002222))))))))	   ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111LLLL))))



	       filename; and if	that also fails, the suffix .zip is
	       appended.  Note that self-extracting ZIP	files are
	       supported; just specify the .exe	suffix (if any)
	       explicitly.

	  [_f_i_l_e(_s)]
	       An optional list	of archive members to be processed.
	       Regular expressions (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xxx _x_f_i_l_e(_s)]
	       An optional list	of archive members to be excluded from
	       processing.

     OOOOPPPPTTTTIIIIOOOONNNNSSSS
	  ----1111   list filenames 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222   list filenames only, one	per line, but allow headers
	       (----hhhh), trailers (----tttt) and zipfile comments	(----zzzz), as well.
	       This option may be useful in cases where	the stored
	       filenames are particularly long.

	  ----ssss   list zipfile info in short Unix ``ls -l'' format.  This
	       is the default behavior;	see below.

	  ----mmmm   list zipfile info in medium Unix	``ls -l'' format.
	       Identical to the	----ssss output, except that the compression
	       factor, expressed as a percentage, is also listed.

	  ----llll   list zipfile info in long Unix ``ls -l''	format.	 As
	       with ----mmmm except that the compressed size (in bytes) is
	       printed instead of the compression ratio.

	  ----vvvv   list zipfile information	in verbose, multi-page format.

	  ----hhhh   list header line.  The archive name, actual size	(in
	       bytes) and total	number of files	is printed.

	  ----ttt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.
	       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.



     Page 2					     (printed 3/25/95)






     ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111LLLL))))       XXXXEEEENNNNIIIIXXXX 3333....0000 ((((22228888 AAAAuuuugggg 99994444 ((((vvvv2222....00002222))))))))	   ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111LLLL))))



	  ----TTT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 (see	examples below).

	  ----zzzz   include the archive comment (if any) in the listing.

     DDDDEEEETTTTAAAAIIIILLLLEEEEDDDD DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
	  _z_i_p_i_n_f_o has a	number of modes, and its behavior can be
	  rather difficult to fathom if	one isn't familiar with	Unix
	  _l_s(1)	(or even if one	is).  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 filename is
	  respected; thus files	which 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
	  filename.

	  The second and third fields indicate that the	file was
	  zipped under Unix with version 1.9 of	_z_i_p.  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 _z_i_p believes the file to
	  be text or binary, respectively; but if the file is
	  encrypted, _z_i_p_i_n_f_o 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 and/or an ``extra field'' associated with the
	  file (fully explained	in PKWare's APPNOTE.TXT, but basically
	  analogous to pragmas in ANSI C--i.e.,	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vvv option below) including the	storage	of VMS file



     Page 3					     (printed 3/25/95)






     ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111LLLL))))       XXXXEEEENNNNIIIIXXXX 3333....0000 ((((22228888 AAAAuuuugggg 99994444 ((((vvvv2222....00002222))))))))	   ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111LLLL))))



	  attributes, which is presumably the case here.  Note that
	  the 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-DOS, OS/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:  (1) is a directory, (2) is	readable (always
	  true), (3) is	writable, (4) is executable (guessed on	the
	  basis	of the extension--._e_x_e,	._c_o_m, ._b_a_t, ._c_m_d and ._b_t_m
	  files	are assumed to be so), (5) has its archive bit set,
	  (6) is hidden, and (7) 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.  In addition, 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 (superfast, fast, normal, maximum compression).
	  _z_i_p_i_n_f_o represents these methods and their sub-methods as
	  follows:  _s_t_o_r; _r_e:_1,	_r_e:_2, etc.; _s_h_r_k; _i_4:_2,	_i_8:_3, etc.;
	  _t_o_k_n;	and _d_e_f_S, _d_e_f_F,	_d_e_f_N, and _d_e_f_X.

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

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



     Page 4					     (printed 3/25/95)






     ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111LLLL))))       XXXXEEEENNNNIIIIXXXX 3333....0000 ((((22228888 AAAAuuuugggg 99994444 ((((vvvv2222....00002222))))))))	   ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111LLLL))))



     -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 _z_i_p(1L) and _u_n_z_i_p.

	  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 _z_i_p's
	  internal overhead).  If, however, one	or more	_f_i_l_e(_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hhh and ----tttt options
	  explicitly.  In such a case the listing format must also be
	  specified explicitly,	since ----hhhh or ----tttt (or both) in the
	  absence of other options implies that	ONLY the header	or
	  trailer line (or both) is listed.  See the EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS section
	  below	for a semi-intelligible	translation of this nonsense.

	  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	_z_i_p_i_n_f_o	may not	match
	  the number given by OS/2's _d_i_r command: OS/2 always reports
	  the number of	bytes required in 16-bit format, whereas
	  _z_i_p_i_n_f_o always reports the 32-bit storage.)

     EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT OOOOPPPPTTTTIIIIOOOONNNNSSSS
	  Modifying _z_i_p_i_n_f_o's default behavior via options placed in
	  an environment variable can be a bit complicated to explain,
	  due to _z_i_p_i_n_f_o's attempts to handle various defaults in an
	  intuitive, yet Unix-like, manner.  (Try not to laugh.)
	  Nevertheless,	there is some underlying logic.	 In brief,



     Page 5					     (printed 3/25/95)






     ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111LLLL))))       XXXXEEEENNNNIIIIXXXX 3333....0000 ((((22228888 AAAAuuuugggg 99994444 ((((vvvv2222....00002222))))))))	   ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111LLLL))))



	  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lll) can make	use of the
	  _z_i_p_i_n_f_o's environment	variable to change this	default:

	      ZIPINFO=-l; export ZIPINFO    Unix Bourne	shell
	      setenv ZIPINFO -l		    Unix C shell
	      set ZIPINFO=-l		    OS/2 or MS-DOS
	      define ZIPINFO_OPTS "-l"	    VMS	(quotes	for _l_o_w_e_r_c_a_s_e)

	  If, in addition, the user dislikes the trailer line,
	  _z_i_p_i_n_f_o'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:	simply ignore the first	hyphen and go from
	  there.  It is	also consistent	with the behavior of the Unix
	  command _n_i_c_e(1).

	  As suggested above, the default variable names are
	  ZIPINFO_OPTS for VMS (where the symbol used to install
	  _z_i_p_i_n_f_o as a foreign command would otherwise be confused
	  with the environment variable), and ZIPINFO for all other
	  operating systems.  For compatibility	with _z_i_p(1L),
	  ZIPINFOOPT is	also accepted (don't ask).  If both ZIPINFO
	  and ZIPINFOOPT are defined, however, ZIPINFO takes
	  precedence.  _u_n_z_i_p's diagnostic option (----vvvv with no zipfile
	  name)	can be used to check the values	of all four possible
	  _u_n_z_i_p	and _z_i_p_i_n_f_o environment	variables.

     EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
	  To get a basic, short-format listing of the complete
	  contents of a	ZIP archive _s_t_o_r_a_g_e._z_i_p, with both header and
	  totals lines,	use only the archive name as an	argument to
	  zipinfo:

	      zipinfo storage

	  To produce a basic, long-format listing (not verbose),
	  including header and totals lines, use ----llll:

	      zipinfo -l storage




     Page 6					     (printed 3/25/95)






     ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111LLLL))))       XXXXEEEENNNNIIIIXXXX 3333....0000 ((((22228888 AAAAuuuugggg 99994444 ((((vvvv2222....00002222))))))))	   ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111LLLL))))



	  To list the complete contents	of the archive without header
	  and totals lines, either negate the ----hhhh and ----tttt	options	or
	  else specify the contents explicitly:

	      zipinfo --h-t storage
	      zipinfo storage \*

	  (where the backslash is required only	if the shell would
	  otherwise expand the `*' wildcard, as	in Unix	when globbing
	  is turned on--double quotes around the asterisk would	have
	  worked as well).  To turn off	the totals line	by default,
	  use the environment variable (C shell	is assumed here):

	      setenv ZIPINFO --t
	      zipinfo storage

	  To get the full, short-format	listing	of the first example
	  again, given that the	environment variable is	set as in the
	  previous example, it is necessary to specify the ----ssss option
	  explicitly, since the	----tttt option by itself implies that ONLY
	  the footer line is to	be printed:

	      setenv ZIPINFO --t
	      zipinfo -t storage	    [only totals line]
	      zipinfo -st storage	    [full listing]

	  The ----ssss option, like ----mmmm and ----llll, includes headers and footers
	  by default, unless otherwise specified.  Since the
	  environment variable specified no footers and	that has a
	  higher precedence than the default behavior of ----ssss, an
	  explicit ----tttt option was necessary to produce the full
	  listing.  Nothing was	indicated about	the header, however,
	  so the ----ssss option was sufficient.  Note that both the ----hhhh and
	  ----tttt options, when used	by themselves or with each other,
	  override any default listing of member files;	only the
	  header and/or	footer are printed.  This behavior is useful
	  when _z_i_p_i_n_f_o is used with a wildcard zipfile specification;
	  the contents of all zipfiles are then	summarized with	a
	  single command.

	  To list information on a single file within the archive, in
	  medium format, specify the filename explicitly:

	      zipinfo -m storage unshrink.c

	  The specification of any member file,	as in this example,
	  will override	the default header and totals lines; only the
	  single line of information about the requested file will be
	  printed.  This is intuitively	what one would expect when
	  requesting information about a single	file.  For multiple
	  files, it is often useful to know the	total compressed and
	  uncompressed size; in	such cases ----tttt may be specified



     Page 7					     (printed 3/25/95)






     ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111LLLL))))       XXXXEEEENNNNIIIIXXXX 3333....0000 ((((22228888 AAAAuuuugggg 99994444 ((((vvvv2222....00002222))))))))	   ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111LLLL))))



	  explicitly:

	      zipinfo -mt storage "*.[ch]" Mak\*

	  To get maximal information about the ZIP archive, use	the
	  verbose option.  It is usually wise to pipe the output into
	  a filter such	as Unix	_m_o_r_e(1)	if the operating system	allows
	  it:

	      zipinfo -v storage | more

	  Finally, to see the most recently modified files in the
	  archive, use the ----TTTT option in	conjunction with an external
	  sorting utility such as Unix _s_o_r_t(1) (and _t_a_i_l(1) as well,
	  in this example):

	      zipinfo -T storage | sort	-n +6 |	tail -15

	  The ----nnnn option	to _s_o_r_t(1) tells it to sort numerically	rather
	  than in ASCII	order, and the ++++6666 option tells it to sort on
	  the sixth field after	the first one (i.e., the seventh
	  field).  This	assumes	the default short-listing format; if
	  ----mmmm or	----llll is used, the	proper _s_o_r_t(1) option would be ++++7777.
	  The _t_a_i_l(1) command filters out all but the last 15 lines of
	  the listing.	Future releases	of _z_i_p_i_n_f_o may incorporate
	  date/time and	filename sorting as built-in options.

     TTTTIIIIPPPPSSSS
	  The author finds it convenient to define an alias _i_i for
	  _z_i_p_i_n_f_o on systems which allow aliases (or, on other
	  systems, copy/rename the executable, create a	link or	create
	  a command file with the name _i_i).  The _i_i usage parallels
	  the common _l_l	alias for long listings	in Unix, and the
	  similarity between the outputs of the	two commands was
	  intentional.

     BBBBUUUUGGGGSSSS
	  None known at	this time, but we're always delighted to find
	  a good one.

     SSSSEEEEEEEE AAAALLLLSSSSOOOO
	  _l_s(1), _f_u_n_z_i_p(1L), _u_n_z_i_p(1L),	_u_n_z_i_p_s_f_x(1L), _z_i_p(1L),
	  _z_i_p_c_l_o_a_k(1L),	_z_i_p_n_o_t_e(1L), _z_i_p_s_p_l_i_t(1L)

     AAAAUUUUTTTTHHHHOOOORRRR
	  Greg Roelofs (a.k.a. Cave Newt).  ZipInfo contains pattern-
	  matching code	by Mark	Adler and fixes/improvements by	many
	  others.  Please refer	to the CONTRIBS	file in	the UnZip
	  source distribution for a more complete list.






     Page 8					     (printed 3/25/95)



