


     UUUUNNNNZZZZIIIIPPPP((((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v5555....11112222))))))))	     UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))



     NNNNAAAAMMMMEEEE
	  unzip	- list,	test and extract compressed files in 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
	  uuuunnnnzzzziiiipppp	[----ZZZZ] [----ccccffffllllppppttttuuuuvvvvzzzz[aaaabbbbjjjjnnnnooooqqqqssssCCCCLLLLVVVV$$$$]] _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d	_e_x_d_i_r]

     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
	  _u_n_z_i_p	will list, test, or extract files from a ZIP archive,
	  commonly found on MS-DOS systems.  The default behavior
	  (with	no options) is to extract into the current directory
	  (and subdirectories below it)	all files from the specified
	  ZIP archive.	A companion program, _z_i_p(1L), creates ZIP
	  archives; both programs are compatible with archives created
	  by PKWARE's _P_K_Z_I_P and	_P_K_U_N_Z_I_P	for MS-DOS, but	in many	cases
	  the program options or default behaviors differ.

     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
	       filename; 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.

	  [_f_i_l_e(_s)]
	       An optional list	of archive members to be processed,



     Page 1					     (printed 3/25/95)






     UUUUNNNNZZZZIIIIPPPP((((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v5555....11112222))))))))	     UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))



	       separated by spaces.  (VMS versions compiled with
	       VMSCLI defined must delimit files with commas instead.
	       See ----vvvv in OOOOPPPPTTTTIIIIOOOONNNNSSSS below.) 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.  Since wildcard characters match directory
	       separators (`/'), this option may be used to exclude
	       any files which are in subdirectories.  For example,
	       ``unzip foo *.[ch] -x */*'' would extract all C source
	       files in	the main directory, but	none in	any
	       subdirectories.	Without	the ----xxxx option, all C source
	       files in	all directories	within the zipfile would be
	       extracted.

	  [----dddd _e_x_d_i_r]
	       An optional directory to	which to extract files.	 By
	       default,	all files and subdirectories are recreated in
	       the current directory; the ----dddd option allows extraction
	       in an arbitrary directory (always assuming one has
	       permission to write to the directory).  This option
	       need not	appear at the end of the command line; it is
	       also accepted immediately after the zipfile
	       specification, or between the _f_i_l_e(_s) and the ----xxxx
	       option.	The option and directory may be	concatenated
	       without any white space between them, but note that
	       this may	cause normal shell behavior to be suppressed.
	       In particular, ``-d ~'' (tilde) is expanded by Unix C
	       shells into the name of the user's home directory, but
	       ``-d~'' is treated as a literal subdirectory ``~~~~'' of
	       the current directory.

     OOOOPPPPTTTTIIIIOOOONNNNSSSS
	  Note that, in	order to support obsolescent hardware, _u_n_z_i_p's
	  usage	screen is limited to 22	or 23 lines and	should
	  therefore be considered a reminder of	the basic _u_n_z_i_p	syntax
	  rather than an exhaustive list of all	possible flags.

	  ----ZZZZ   _z_i_p_i_n_f_o(1L) mode.  If the first option on the command
	       line is ----ZZZZ, the remaining options are taken to be
	       _z_i_p_i_n_f_o(1L) options.  See the appropriate manual	page
	       for a description of these options.

	  ----cccc   extract files to	stdout/screen (``CRT'').  This option
	       is similar to the ----pppp option except that the name	of
	       each file is printed as it is extracted,	the ----aaaa option
	       is allowed, and ASCII-EBCDIC conversion is
	       automatically performed if appropriate.	This option is



     Page 2					     (printed 3/25/95)






     UUUUNNNNZZZZIIIIPPPP((((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v5555....11112222))))))))	     UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))



	       not listed in the _u_n_z_i_p usage screen.

	  ----ffff   freshen existing	files, i.e., extract only those	files
	       which already exist on disk and which are newer than
	       the disk	copies.	 By default _u_n_z_i_p queries before
	       overwriting, but	the ----oooo option may be used to suppress
	       the queries.  Note that under many operating systems,
	       the TZ (timezone) environment variable must be set
	       correctly in order for ----ffff and ----uuuu	to work	properly
	       (under Unix the variable	is usually set automatically).
	       The reasons for this are	somewhat subtle	but have to do
	       with the	differences between DOS-format file times
	       (always local time) and Unix-format times (always in
	       GMT) and	the necessity to compare the two.  A typical
	       TZ value	is ``PST8PDT'' (US Pacific time	with automatic
	       adjustment for Daylight Savings Time or ``summer
	       time'').

	  ----llll   list archive files (short format).  The names,
	       uncompressed file sizes and modification	dates and
	       times of	the specified files are	printed, along with
	       totals for all files specified.	In addition, the
	       zipfile comment and individual file comments (if	any)
	       are displayed.  If a file was archived from a single-
	       case file system	(for example, the old MS-DOS FAT file
	       system) and the ----LLLL option was given, the	filename is
	       converted to lowercase and is prefixed with a caret
	       (^).

	  ----pppp   extract files to	pipe (stdout).	Nothing	but the	file
	       data is sent to stdout, and the files are always
	       extracted in binary format, just	as they	are stored (no
	       conversions).

	  ----tttt   test archive files.  This option	extracts each
	       specified file in memory	and compares the CRC (cyclic
	       redundancy check, an enhanced checksum) of the expanded
	       file with the original file's stored CRC	value.

	  ----uuuu   update existing files and create	new ones if needed.
	       This option performs the	same function as the ----ffff
	       option, extracting (with	query) files which are newer
	       than those with the same	name on	disk, and in addition
	       it extracts those files which do	not already exist on
	       disk.  See ----ffff above for information on setting the
	       timezone	properly.

	  ----vvvv   be verbose or print diagnostic version info.  This
	       option has evolved and now behaves as both an option
	       and a modifier.	As an option it	has two	purposes:
	       when a zipfile is specified with	no other options, ----vvvv
	       lists archive files verbosely, adding to	the ----llll info



     Page 3					     (printed 3/25/95)






     UUUUNNNNZZZZIIIIPPPP((((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v5555....11112222))))))))	     UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))



	       the compression method, compressed size,	compression
	       ratio and 32-bit	CRC.  When no zipfile is specified
	       (that is, the complete command is simply	``unzip	-v''),
	       a diagnostic screen is printed.	In addition to the
	       normal header with release date and version, _u_n_z_i_p
	       lists the home Info-ZIP ftp site	and where to find a
	       list of other ftp and non-ftp sites; the	target
	       operating system	for which it was compiled, as well as
	       (possibly) the hardware on which	it was compiled, the
	       compiler	and version used, and the compilation date;
	       any special compilation options which might affect the
	       program's operation (see	also DDDDEEEECCCCRRRRYYYYPPPPTTTTIIIIOOOONNNN	below);	and
	       any options stored in environment variables which might
	       do the same (see	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 below).  As	a
	       modifier	it works in conjunction	with other options
	       (e.g., ----tttt) to produce more verbose or debugging output;
	       this is not yet fully implemented but will be in	future
	       releases.

	  ----zzzz   display only the	archive	comment.

     MMMMOOOODDDDIIIIFFFFIIIIEEEERRRRSSSS
	  ----aaaa   convert text files.  Ordinarily all files are extracted
	       exactly as they are stored (as ``binary'' files).  The
	       ----aaaa option causes	files identified by _z_i_p	as text	files
	       (those with the `t' label in _z_i_p_i_n_f_o listings, rather
	       than `b') to be automatically extracted as such,
	       converting line endings,	end-of-file characters and the
	       character set itself as necessary.  (For	example, Unix
	       files use line feeds (LFs) for end-of-line (EOL)	and
	       have no end-of-file (EOF) marker; Macintoshes use
	       carriage	returns	(CRs) for EOLs;	and most PC operating
	       systems use CR+LF for EOLs and control-Z	for EOF.  In
	       addition, IBM mainframes	and the	Michigan Terminal
	       System use EBCDIC rather	than the more common ASCII
	       character set, and NT supports Unicode.)	Note that
	       _z_i_p's identification of text files is by	no means
	       perfect;	some ``text'' files may	actually be binary and
	       vice versa.  _u_n_z_i_p therefore prints ``[text]'' or
	       ``[binary]'' as a visual	check for each file it
	       extracts	when using the ----aaaa option.  The ----aaaaaaaa option
	       forces all files	to be extracted	as text, regardless of
	       the supposed file type.

	  ----bbbb   treat all files as binary (no text conversions).	 This
	       is a shortcut for ------------aaaa.

	  ----CCCC   match filenames case-insensitively.  _u_n_z_i_p's philosophy
	       is ``you	get what you ask for'' (this is	also
	       responsible for the ----LLLL/----UUUU change; see the relevant
	       options below).	Because	some filesystems are fully
	       case-sensitive (notably those under the Unix operating



     Page 4					     (printed 3/25/95)






     UUUUNNNNZZZZIIIIPPPP((((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v5555....11112222))))))))	     UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))



	       system) and because both	ZIP archives and _u_n_z_i_p itself
	       are portable across platforms, _u_n_z_i_p's default behavior
	       is to match both	wildcard and literal filenames case-
	       sensitively.  That is, specifying ``makefile'' on the
	       command line will _o_n_l_y match ``makefile'' in the
	       archive,	not ``Makefile'' or ``MAKEFILE'' (and
	       similarly for wildcard specifications).	Since this
	       does not	correspond to the behavior of many other
	       operating/file systems (for example, OS/2 HPFS which
	       preserves mixed case but	is not sensitive to it), the
	       ----CCCC option may be	used to	force all filename matches to
	       be case-insensitive.  In	the example above, all three
	       files would then	match ``makefile'' (or ``make*'', or
	       similar).  The ----CCCC option	affects	files in both the
	       normal file list	and the	excluded-file list (xlist).

	  ----jjjj   junk paths.  The	archive's directory structure is not
	       recreated; all files are	deposited in the extraction
	       directory (by default, the current one).

	  ----LLLL   convert to lowercase any	filename originating on	an
	       uppercase-only operating	system or filesystem.  (This
	       was _u_n_z_i_p's default behavior in releases	prior to 5.11;
	       the new default behavior	is identical to	the old
	       behavior	with the ----UUUU option, which is now obsolete and
	       will be removed in a future release.)  Depending	on the
	       archiver, files archived	under single-case filesystems
	       (VMS, old MS-DOS	FAT, etc.) may be stored as all-
	       uppercase names;	this can be ugly or inconvenient when
	       extracting to a case-preserving filesystem such as OS/2
	       HPFS or a case-sensitive	one such as under Unix.	 By
	       default _u_n_z_i_p lists and extracts	such filenames exactly
	       as they're stored (excepting truncation,	conversion of
	       unsupported characters, etc.); this option causes the
	       names of	all files from certain systems to be converted
	       to lowercase.

	  ----nnnn   never overwrite existing	files.	If a file already
	       exists, skip the	extraction of that file	without
	       prompting.  By default _u_n_z_i_p queries before extracting
	       any file	which already exists; the user may choose to
	       overwrite only the current file,	overwrite all files,
	       skip extraction of the current file, skip extraction of
	       all existing files, or rename the current file.

	  ----oooo   overwrite existing files	without	prompting.  This is a
	       dangerous option, so use	it with	care.  (It is often
	       used with ----ffff, however.)

	  ----qqqq   perform operations quietly (----qqqqqqqq = even quieter).
	       Ordinarily _u_n_z_i_p	prints the names of the	files it's
	       extracting or testing, the extraction methods, any file



     Page 5					     (printed 3/25/95)






     UUUUNNNNZZZZIIIIPPPP((((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v5555....11112222))))))))	     UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))



	       or zipfile comments which may be	stored in the archive,
	       and possibly a summary when finished with each archive.
	       The ----qqqq[qqqq] options suppress the printing of some or all
	       of these	messages.

	  ----ssss   [OS/2, NT, MS-DOS] convert spaces in filenames to
	       underscores.  Since all PC operating systems allow
	       spaces in filenames, _u_n_z_i_p by default extracts
	       filenames with spaces intact (e.g., ``EA	DATA. SF'').
	       This can	be awkward, however, since MS-DOS in
	       particular does not gracefully support spaces in
	       filenames.  Conversion of spaces	to underscores can
	       eliminate the awkwardness in some cases.

	  ----UUUU   (obsolete; to be	removed	in a future release) leave
	       filenames uppercase if created under MS-DOS, VMS, etc.
	       See ----LLLL above.

	  ----VVVV   retain (VMS) file version numbers.  VMS files can be
	       stored with a version number, in	the format
	       file.ext;##.  By	default	the ``;##'' version numbers
	       are stripped, but this option allows them to be
	       retained.  (On filesystems which	limit filenames	to
	       particularly short lengths, the version numbers may be
	       truncated or stripped regardless	of this	option.)

	  ----XXXX   [VMS] restore owner/protection info (may	require	system
	       privileges).  Ordinary file attributes are always
	       restored, but this option allows	UICs to	be restored as
	       well.  [The next	version	of _u_n_z_i_p will support Unix
	       UID/GID info as well, and possibly NT permissions.]

	  ----$$$$   [MS-DOS,	OS/2, NT, Amiga] restore the volume label if
	       the extraction medium is	removable (e.g., a diskette).
	       Doubling	the option (----$$$$$$$$) allows	fixed media (hard
	       disks) to be labelled as	well.  By default, volume
	       labels are ignored.

     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
	  _u_n_z_i_p's default behavior may be modified via options placed
	  in an	environment variable.  This can	be done	with any
	  option, but it is probably most useful with the ----aaaa, ----LLLL, ----CCCC,
	  ----qqqq, ----oooo, or ----nnnn	modifiers:  make _u_n_z_i_p auto-convert text files
	  by default, make it convert filenames	from uppercase systems
	  to lowercase,	make it	match names case-insensitively,	make
	  it quieter, or make it always	overwrite or never overwrite
	  files	as it extracts them.  For example, to make _u_n_z_i_p act
	  as quietly as	possible, only reporting errors, one would use
	  one of the following commands:

	      UNZIP=-qq; export	UNZIP	 Unix Bourne shell
	      setenv UNZIP -qq		 Unix C	shell



     Page 6					     (printed 3/25/95)






     UUUUNNNNZZZZIIIIPPPP((((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v5555....11112222))))))))	     UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))



	      set UNZIP=-qq		 OS/2 or MS-DOS
	      define UNZIP_OPTS	"-qq"	 VMS (quotes for _l_o_w_e_r_c_a_s_e)

	  Environment options are, in effect, considered to be just
	  like any other command-line options, except that they	are
	  effectively the first	options	on the command line.  To
	  override an environment option, one may use the ``minus
	  operator'' to	remove it.  For	instance, to override one of
	  the quiet-flags in the example above,	use the	command

	      unzip --q[_o_t_h_e_r _o_p_t_i_o_n_s] _z_i_p_f_i_l_e

	  The first hyphen is the normal switch	character, and the
	  second is a minus sign, acting on the	q option.  Thus	the
	  effect here is to cancel one quantum of quietness.  To
	  cancel both quiet flags, two (or more) minuses may be	used:

	      unzip -t--q zipfile
	      unzip ---qt zipfile

	  (the two are equivalent).  This may seem awkward or
	  confusing, but it is reasonably intuitive:  just ignore the
	  first	hyphen and go from there.  It is also consistent with
	  the behavior of Unix _n_i_c_e(1).

	  As suggested by the examples above, the default variable
	  names	are UNZIP_OPTS for VMS (where the symbol used to
	  install _u_n_z_i_p	as a foreign command would otherwise be
	  confused with	the environment	variable), and UNZIP for all
	  other	operating systems.  For	compatibility with _z_i_p(1L),
	  UNZIPOPT is also accepted (don't ask).  If both UNZIP	and
	  UNZIPOPT are defined,	however, UNZIP 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.

	  The timezone variable	(TZ) should be set according to	the
	  local	timezone in order for the ----ffff and ----uuuu to operate
	  correctly.  See the description of ----ffff	above for details.
	  This variable	may also be necessary in order for timestamps
	  on extracted files to	be set correctly.

     DDDDEEEECCCCRRRRYYYYPPPPTTTTIIIIOOOONNNN
	  Encrypted archives are fully supported by Info-ZIP software,
	  but due to United States export restrictions,	the encryption
	  and decryption sources are not packaged with the regular
	  _u_n_z_i_p	and _z_i_p	distributions.	Since the crypt	sources	were
	  written by Europeans,	however, they are freely available at
	  sites	throughout the world; see the file ``Where'' in	any
	  Info-ZIP source or binary distribution for locations both
	  inside and outside the US.




     Page 7					     (printed 3/25/95)






     UUUUNNNNZZZZIIIIPPPP((((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v5555....11112222))))))))	     UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))



	  Because of the separate distribution,	not all	compiled
	  versions of _u_n_z_i_p support decryption.	 To check a version
	  for crypt support, either attempt to test or extract an
	  encrypted archive, or	else check _u_n_z_i_p's diagnostic screen
	  (see the ----vvvv option above) for	``[decryption]'' as one	of the
	  special compilation options.

	  There	are no runtime options for decryption; if a zipfile
	  member is encrypted, _u_n_z_i_p will prompt for the password
	  without echoing what is typed.  _u_n_z_i_p	continues to use the
	  same password	as long	as it appears to be valid; it does
	  this by testing a 12-byte header.  The correct password will
	  always check out against the header, but there is a 1-in-256
	  chance that an incorrect password will as well.  (This is a
	  security feature of the PKWARE zipfile format; it helps
	  prevent brute-force attacks which might otherwise gain a
	  large	speed advantage	by testing only	the header.)  In the
	  case that an incorrect password is given but it passes the
	  header test anyway, either an	incorrect CRC will be
	  generated for	the extracted data or else _u_n_z_i_p will fail
	  during the extraction	because	the ``decrypted'' bytes	do not
	  constitute a valid compressed	data stream.

	  If the first password	fails the header check on some file,
	  _u_n_z_i_p	will prompt for	another	password, and so on until all
	  files	are extracted.	If a password is not known, entering a
	  null password	(that is, just a carriage return) is taken as
	  a signal to skip all further prompting.  Only	unencrypted
	  files	in the archive(s) will thereafter be extracted.
	  (Actually that's not quite true; older versions of _z_i_p(1L)
	  and _z_i_p_c_l_o_a_k(1L) allowed null	passwords, so _u_n_z_i_p checks
	  each encrypted file to see if	the null password works.  This
	  may result in	``false	positives'' and	extraction errors, as
	  noted	above.)

	  Note that there is presently no way to avoid interactive
	  decryption.  This is another security	feature:  plaintext
	  passwords given on the command line or stored	in files
	  constitute a risk because they may be	seen by	others.
	  Future releases may (under protest, with great disapproval)
	  support such shenanigans.

     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 use _u_n_z_i_p to extract all members of the archive
	  _l_e_t_t_e_r_s._z_i_p into the current directory and subdirectories
	  below	it, creating any subdirectories	as necessary:

	      unzip letters

	  To extract all members of _l_e_t_t_e_r_s._z_i_p	into the current
	  directory only:




     Page 8					     (printed 3/25/95)






     UUUUNNNNZZZZIIIIPPPP((((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v5555....11112222))))))))	     UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))



	      unzip -j letters

	  To test _l_e_t_t_e_r_s._z_i_p, printing	only a summary message
	  indicating whether the archive is OK or not:

	      unzip -tq	letters

	  To test _a_l_l zipfiles in the current directory, printing only
	  the summaries:

	      unzip -tq	\*.zip

	  (The backslash before	the asterisk is	only required if the
	  shell	expands	wildcards, as in Unix; double quotes could
	  have been used instead, as in	the source examples
	  below.)  To extract to standard output all members of
	  _l_e_t_t_e_r_s._z_i_p whose names end in ._t_e_x, auto-converting to the
	  local	end-of-line convention and piping the output into
	  _m_o_r_e(1):

	      unzip -ca	letters	\*.tex | more

	  To extract the binary	file _p_a_p_e_r_1._d_v_i	to standard output and
	  pipe it to a printing	program:

	      unzip -p articles	paper1.dvi | dvips

	  To extract all FORTRAN and C source files--*.f, *.c, *.h,
	  and Makefile--into the /tmp directory:

	      unzip source.zip "*.[fch]" Makefile -d /tmp

	  (the double quotes are necessary only	in Unix	and only if
	  globbing is turned on).  To extract all FORTRAN and C	source
	  files, regardless of case (e.g., both	*.c and	*.C, and any
	  makefile, Makefile, MAKEFILE or similar):

	      unzip -C source.zip "*.[fch]" makefile -d	/tmp

	  To extract any such files but	convert	any uppercase MS-DOS
	  or VMS names to lowercase and	convert	the line-endings of
	  all of the files to the local	standard (without respect to
	  any files which might	be marked ``binary''):

	      unzip -aaCL source.zip "*.[fch]" makefile	-d /tmp

	  To extract only newer	versions of the	files already in the
	  current directory, without querying (NOTE:  be careful of
	  unzipping in one timezone a zipfile created in another--ZIP
	  archives to date contain no timezone information, and	a
	  ``newer'' file from an eastern timezone may, in fact,	be
	  older):



     Page 9					     (printed 3/25/95)






     UUUUNNNNZZZZIIIIPPPP((((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v5555....11112222))))))))	     UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))



	      unzip -fo	sources

	  To extract newer versions of the files already in the
	  current directory and	to create any files not	already	there
	  (same	caveat as previous example):

	      unzip -uo	sources

	  To display a diagnostic screen showing which _u_n_z_i_p and
	  _z_i_p_i_n_f_o options are stored in	environment variables, whether
	  decryption support was compiled in, the compiler with	which
	  _u_n_z_i_p	was compiled, etc.:

	      unzip -v

	  In the last five examples, assume that UNZIP or UNZIP_OPTS
	  is set to -q.	 To do a singly	quiet listing:

	      unzip -l file.zip

	  To do	a doubly quiet listing:

	      unzip -ql	file.zip

	  (Note	that the ``.zip'' is generally not necessary.)	To do
	  a standard listing:

	      unzip --ql file.zip
	  or
	      unzip -l-q file.zip
	  or
	      unzip -l--q file.zip	 (extra	minuses	don't hurt)

     TTTTIIIIPPPPSSSS
	  The current maintainer, being	a lazy sort, finds it very
	  useful to define a pair of aliases:  tt for ``unzip -tq''
	  and ii for ``unzip -Z'' (or ``zipinfo'').  One may then
	  simply type ``tt zipfile'' to	test an	archive, something
	  which	is worth making	a habit	of doing.  With	luck _u_n_z_i_p
	  will report ``No errors detected in zipfile.zip,'' _a_f_t_e_r
	  _w_h_i_c_h	_o_n_e _m_a_y	_b_r_e_a_t_h_e	_a _s_i_g_h _o_f _r_e_l_i_e_f.

	  The maintainer also finds it useful to set the UNZIP
	  environment variable to ``-aL'' and is tempted to add	``-C''
	  as well.  His	ZIPINFO	variable is set	to ``-z''.

     DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
	  The exit status (or error level) approximates	the exit codes
	  defined by PKWARE and	takes on the following values, except
	  under	VMS:

	       0    normal; no errors or warnings detected.



     Page 10					     (printed 3/25/95)






     UUUUNNNNZZZZIIIIPPPP((((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v5555....11112222))))))))	     UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))



	       1    one	or more	warning	errors were encountered, but
		    processing completed successfully anyway.  This
		    includes zipfiles where one	or more	files was
		    skipped due	to unsupported compression method or
		    encryption with an unknown password.

	       2    a generic error in the zipfile format was
		    detected.  Processing may have completed
		    successfully anyway; some broken zipfiles created
		    by other archivers have simple work-arounds.

	       3    a severe error in the zipfile format was detected.
		    Processing probably	failed immediately.

	       4-8  _u_n_z_i_p was unable to	allocate memory	for one	or
		    more buffers.

	       9    the	specified zipfiles were	not found.

	       10   invalid options were specified on the command
		    line.

	       11   no matching	files were found.

	       50   the	disk is	(or was) full during extraction.

	       51   the	end of the ZIP archive was encountered
		    prematurely.

	  VMS interprets standard Unix (or PC) return values as	other,
	  scarier-looking things, so by	default	_u_n_z_i_p always returns 0
	  (which reportedly gets converted into	a VMS status of	1--
	  i.e.,	success).  There are two compilation options available
	  to modify or expand upon this	behavior:  defining
	  RETURN_CODES results in a human-readable explanation of what
	  the real error status	was (but still with a faked
	  ``success'' exit value), while defining RETURN_SEVERITY
	  causes _u_n_z_i_p to exit with a ``real'' VMS status.  The	latter
	  behavior will	become the default in future versions unless
	  it is	found to conflict with officially defined VMS codes.
	  The current mapping is as follows:   1 (success) for normal
	  exit,	0x7fff0001 for warning errors, and (0x7fff000? +
	  16*normal_unzip_exit_status) for all other errors, where the
	  `?' is 2 (error) for _u_n_z_i_p values 2 and 9-11,	and 4 (fatal
	  error) for the remaining ones	(3-8, 50, 51).	Check the
	  ``unzip -v'' output to see whether RETURN_SEVERITY was
	  defined at compilation time.

     BBBBUUUUGGGGSSSS
	  When attempting to extract a corrupted archive, _u_n_z_i_p	may go
	  into an infinite loop	and, if	not stopped quickly enough,
	  fill all available disk space.  Compiling with CHECK_EOF



     Page 11					     (printed 3/25/95)






     UUUUNNNNZZZZIIIIPPPP((((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v5555....11112222))))))))	     UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))



	  should fix this problem for all zipfiles, but	the option was
	  introduced too late in the testing process to	be made	the
	  default behavior.  Future versions will be robust enough to
	  fail gracefully on damaged archives.	Check the ``unzip -v''
	  output to see	whether	CHECK_EOF was defined during
	  compilation.

	  [MS-DOS] When	extracting or testing files from an archive on
	  a defective floppy diskette, if the ``Fail'' option is
	  chosen from DOS's ``Abort, Retry, Fail?'' message, _u_n_z_i_p may
	  hang the system, requiring a reboot.	Instead, press
	  control-C (or	control-Break) to terminate _u_n_z_i_p.

	  Under	DEC Ultrix, _u_n_z_i_p will sometimes fail on long zipfiles
	  (bad CRC, not	always reproducible).  This is apparently due
	  either to a hardware bug (cache memory) or an	operating
	  system bug (improper handling	of page	faults?).

	  Dates	and times of stored directories	are not	restored.

	  [OS/2] Extended attributes for existing directories are
	  never	updated.  This is a limitation of the operating
	  system; _u_n_z_i_p	has no way to determine	whether	the stored
	  attributes are newer or older	than the existing ones.

	  [VMS]	When extracting	to another directory, only the [._f_o_o]
	  syntax is accepted for the ----dddd	option;	the simple Unix	_f_o_o
	  syntax is silently ignored (as is the	less common VMS
	  _f_o_o._d_i_r syntax).

	  [VMS]	When the file being extracted already exists, _u_n_z_i_p's
	  query	only allows skipping, overwriting or renaming; there
	  should additionally be a choice for creating a new version
	  of the file.	In fact, the ``overwrite'' choice does create
	  a new	version; the old version is not	overwritten or
	  deleted.

     SSSSEEEEEEEE AAAALLLLSSSSOOOO
	  _f_u_n_z_i_p(1L), _z_i_p(1L), _z_i_p_c_l_o_a_k(1L), _z_i_p_g_r_e_p(1L), _z_i_p_i_n_f_o(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RSSSS
	  The primary Info-ZIP authors (current	zip-bugs workgroup)
	  are:	Jean-loup Gailly (Zip);	Greg R.	Roelofs	(UnZip); Mark
	  Adler	(decompression,	fUnZip); Kai Uwe Rommel	(OS/2);	Igor
	  Mandrichenko and Hunter Goatley (VMS); John Bush and Paul
	  Kienitz (Amiga); Antoine Verheijen (Macintosh); Chris
	  Herborth (Atari); Henry Gessau (NT); Karl Davis, Sergio
	  Monesi and Evan Shattock (Acorn Archimedes); and Robert
	  Heath	(Windows).  The	author of the original unzip code upon
	  which	Info-ZIP's is based was	Samuel H. Smith; Carl Mascott
	  did the first	Unix port; and David P.	Kirschbaum organized



     Page 12					     (printed 3/25/95)






     UUUUNNNNZZZZIIIIPPPP((((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v5555....11112222))))))))	     UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))



	  and led Info-ZIP in its early	days.  The full	list of
	  contributors to UnZip	has grown quite	large; please refer to
	  the CONTRIBS file in the UnZip source	distribution for a
	  relatively complete version.

     VVVVEEEERRRRSSSSIIIIOOOONNNNSSSS
	  v1.2	 15 Mar	89   Samuel H. Smith
	  v2.0	  9 Sep	89   Samuel H. Smith
	  v2.x	 fall 1989   many Usenet contributors
	  v3.0	  1 May	90   Info-ZIP (DPK, consolidator)
	  v3.1	 15 Aug	90   Info-ZIP (DPK, consolidator)
	  v4.0	  1 Dec	90   Info-ZIP (GRR, maintainer)
	  v4.1	 12 May	91   Info-ZIP
	  v4.2	 20 Mar	92   Info-ZIP (zip-bugs	subgroup, GRR)
	  v5.0	 21 Aug	92   Info-ZIP (zip-bugs	subgroup, GRR)
	  v5.01	 15 Jan	93   Info-ZIP (zip-bugs	subgroup, GRR)
	  v5.1	  7 Feb	94   Info-ZIP (zip-bugs	subgroup, GRR)
	  v5.11	  2 Aug	94   Info-ZIP (zip-bugs	subgroup, GRR)
	  v5.12	 28 Aug	94   Info-ZIP (zip-bugs	subgroup, GRR)




































     Page 13					     (printed 3/25/95)



