UNZIP

From AtariForumWiki
Jump to navigation Jump to search
__________________________________________________________________________

  This is the Info-ZIP file ``Where,'' last updated on 6 February 1994.
__________________________________________________________________________

   Note that some ftp sites may not yet have the latest versions of
   Zip and UnZip when you read this.  The latest versions, including
   the crypt sources, are always in ftp.uu.net:/pub/archiving/zip/...

   SITE OWNERS:  If you're listed in here but the information is not
   correct (or if you're a big or overseas site but aren't listed at
   all), please let us know!  E-mail to zip-bugs at the address given
   in README and we'll update this file.
__________________________________________________________________________


Basic source-archive names for Info-ZIP's portable Zip, UnZip, and related
utilities (on some ftp sites, the .zip files may have a .zoo equivalent
in Zoo 2.10 format):

   zip201.zip      Zip 2.0.1 (deflation; includes zipnote, zipsplit)
   zip201.tar.Z    ditto, compress'd tar format

   zip11.zip       Zip 1.1 (shrinking, implosion; compatible with PKUNZIP 1.1)
   zip11.tar.Z     ditto, compress'd tar format

   unzip51.zip     UnZip 5.1 (all methods supported; includes zipinfo, funzip)
   unzip51.tar.Z   ditto, compress'd tar format

   wunz20sr.zip    WizUnZip 2.0 sources for Windows 3.x; based on UnZip 5.0p1

   zcrypt21.zip    encryption/decryption support (includes zipcloak)

Related archives and files:

   UnzpHist.zip    complete changes history of UnZip and precursors

   zip201x.zip     MSDOS executables and docs for zip, zipnote, zipsplit
   zcryp20x.zip    MSDOS encryption executables and docs for zip, zipcloak
   unzip51.exe     MSDOS self-extracting executable (contains unzip, docs)

   zip201x1.zip    OS/2 1.x 16-bit executables and docs
   zip201x2.zip    OS/2 2.x 32-bit executables and docs
   unz51x1.exe     OS/2 1.x 16-bit executables and docs
   unz51x2.exe     OS/2 2.x 32-bit executables and docs

   zip201vms.zip   VMS executables and docs for zip, zipnote, zipsplit
   unz51vms.exe    VMS executable for unzip
   unz51vms.zip    VMS executable for funzip; documentation

   mac-unzip-51.hqx  Macintosh executable (unzip only, zip not done yet).

   wunz20x.zip     WizUnZip 2.0 executable/docs for Windows & NT 3.1, OS/2 2.1
   wunl20x.zip     same as wunz20x.zip, plus two DLLs for Win 3.0 and OS/2 2.0

   pkz204g.exe     MS-DOS PKZIP/PKUNZIP 2.04g (self-extracting archive)
   pkz110eu.exe    MS-DOS PKZIP/PKUNZIP 1.1 (self-extracting)
   pkz102-2.exe    OS/2 PKZIP/PKUNZIP 1.02 (self-extracting)

ftp sites for the US-exportable sources and executables:

   NOTE:  Look for the file names given above in the following
   directories.  Some sites like to use slightly different names,
   such as zip-2.0.1.tar-z instead of zip201.tar.Z, or MacUnZip-5.1.hqx
   instead of mac-unzip-51.hqx.  In the case of some comp.sources.misc
   archive sites, directories may be used (zip201/part01.Z ... part11.Z,
   zip201/patch01.Z, etc.).

   ftp.uu.net:/pub/archiving/zip/...    [THIS MIRRORS THE INFO-ZIP HOME SITE]

   oak.oakland.edu:/pub/misc/unix/...
   oak.oakland.edu:/pub/misc/vaxvms/...
   oak.oakland.edu:/pub/msdos/zip/...
   oak.oakland.edu:/pub/msdos/windows3/...

   wuarchive.wustl.edu:/mirrors/misc/unix/...
   wuarchive.wustl.edu:/mirrors/misc/vaxvms/...
   wuarchive.wustl.edu:/mirrors/msdos/zip/...
   wuarchive.wustl.edu:/mirrors/msdos/windows3/...
   wuarchive.wustl.edu:/packages/compression/...

   ftp-os2.cdrom.com:/pub/os2/{2_x,all}/archiver/...
   ftp-os2.nmsu.edu:/os2/{2_x,all}/archiver/...
   ftp.informatik.tu-muenchen.de:/pub/comp/os/os2/archiver/...

   wuarchive.wustl.edu:/mirrors/msdos/zip/pkz204g.exe

   sumex-aim.stanford.edu:/info-mac/util/mac-unzip-51.hqx

ftp sites for the encryption and decryption sources and/or executables:

   NOTE 1:  Non-US users, please do NOT ftp from the US sites (US
   regulations and all that).  Likewise, US users, please do not
   ftp from the European sites (it's not illegal, but it sure is
   a waste of expensive bandwidth).

   NOTE 2:  Some sites may carry both encryption and non-encryption
   executables with slightly different names; for example, zip201c2.zip
   instead of zip201x2.zip ("c" == crypt version).  Other sites may
   include *only* the encryption-related executables (zip and zipcloak)
   in a second archive (e.g., zcryp20x.zip).

   From the US:
      wuarchive.wustl.edu:/mirrors/garbo.uwasa.fi/arcutil/zcrypt21.zip
      ftp.uu.net:/pub/archiving/zip/zcrypt21.zip

   Outside the US:
      garbo.uwasa.fi:/pc/arcutil/zcrypt21.zip
      ftp.inria.fr:/system/arch-compr/zcrypt21.zip
      ftp.informatik.tu-muenchen.de:/pub/comp/os/os2/archiver/zcrypt21.zip
         (mail server at ftp-mailer@informatik.tu-muenchen.de)

      ftp.win.tue.nl:/pub/compression/zip/...
      ftp.uni-erlangen.de:/pub/pc/msdos/utilities/zip/...

ftp sites for VMS-format Zip/UnZip package (sources and executables, no
encryption/decryption--see also "Mail servers" section below):

      ftp.uu.net:/pub/archiving/zip/VMS/*

   The ZIP-UNZIP package for VMS is available via anonymous ftp from
   ftp.spc.edu [192.107.46.27]; the following files are needed:

   [.MACRO32]AAAREADME.TXT
   [.MACRO32]LZDCMP.EXE
   [.MACRO32.SAVESETS]ZIP-UNZIP.BCK_Z

   VMS sources and object files are also available from vmsnet.sources
   archives (e.g., black.cerritos.edu:[.mailserv.zip_unzip]*.*).

To find other ftp sites:

   The "archie" ftp database utility can be used to find an ftp site
   near you.  If you don't know how to use it, DON'T ASK US--check the
   Usenet groups news.newusers.questions or news.answers or some such,
   or ask your system administrator (or just RTFM :-) ).

UUCP sites:

   uunet!~/pub/archiving/zip/ ...

Bulletin boards (commercial and otherwise):

   Sources, MS-DOS executables:
      CompuServe IBMPRO forum, Library 10, Data Compression (unz51.zip,
         sources; unz51.exe, self-extracting executables and docs)
      CompuServe (ZiffNet) PBSUTIL forum and Public Brand Software BBS
         [US, membership required; V.32 line, (317) 856-1490]
         (unz51.zip, sources; unz51.exe, self-extracting exes and docs)
      Drealm Conference System [London, UK; V.22bis, subscriber lines
         to V.32bis, etc.; (+44) 81 568 2204]
      Compulink Information eXchange (CIX) [UK ... details?]

   Windows sources and executables:
      CompuServe ZENITH forum (wunzip.zip, WizUnZip exe + libs for
         Win 3.x, NT, OS/2 2.x)
      CompuServe CRAFTS forum (wunz20.exe, WizUnZip bare executable
         for Win 3.1, NT, OS/2 2.1)

   OS/2 executables:
      CompuServe OS2USER forum (zip201.zip and unz51.exe, OS/2 16-
         and 32-bit exes and docs)

   Amiga executables:
      BIX in AMIGA files section (perform keyword search on "info-zip")
         [requires account; telnet bix.com, or "C BIX" via local Sprint
         X.25 PAD, or dial direct in US at (617) 491-5410]

   Atari executables:
      Gilligan's Island [V.32, 24 hours/day, etc.; (519) 895-1294]
      GEnie in Atari ST RoundTable

Mail servers:

   If you don't have anonymous FTP capability, you can mail one
   of the following commands (in the body of an e-mail message) to
   listserv@vm.ecs.rpi.edu or listserv@vm1.nodak.edu in order to
   get a copy via e-mail:

      /pdget mail /pub/misc/unix/unzip51.tar.Z uuencode
      /pdget mail /pub/misc/unix/zip201.zip uuencode

   The older, pseudo-TOPS-20 style also works:

      /pdget mail pd:<misc.unix>unzip51.tar.Z uuencode
      /pdget mail pd:<misc.unix>zip201.zip uuencode

   [NOTE:  As of 28 Jan 94, the NoDak server still had a minor bug in
   its code which prevented it from finding files with more than one
   dot in their names.  The RPI server had just fixed this bug, and in
   all likelihood the NoDak server will be fixed before you read this.]

   To get the encryption source by e-mail, send the following commands
   to ftp-mailer@informatik.tu-muenchen.de:

      get /pub/utils/archiver/zcrypt21.zip
      quit

   To get the VMS Zip/UnZip package by e-mail, send the following
   commands in the body of a mail message to mxserver@wkuvx1.wku.edu
   (the "HELP" command is also accepted):

      SEND ZIP-UNZIP
      SEND FILESERV_TOOLS
__________________________________________________________________________


ZIPINFO(1L)            LOCAL USER COMMANDS            ZIPINFO(1L)

NAME
     zipinfo - list detailed information about a ZIP archive

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

     unzip    -Z    [-12smlvhtz]     file[.zip]     [file(s) ...]
     [-x xfile(s) ...]

DESCRIPTION
     zipinfo lists technical information about  files  in  a  ZIP
     archive, most commonly found on MS-DOS systems.  Such infor-
     mation 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 DETAILED DESCRIPTION below.  Note that zipinfo
     is the same program as unzip (under Unix, a link to it);  on
     some systems, zipinfo support may not have been compiled in.

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  sys-
          tem).   Only  the  filename can be a wildcard; the path
          itself cannot.  Wildcard  expressions  are  similar  to
          Unix egrep(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 `^') fol-
               lows the left bracket, then the range  of  charac-
               ters within the brackets is complemented (that is,
               anything except 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 sup-
          ported; just specify the .exe suffix  (if  any)  expli-
          citly.

     [file(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 modi-
          fied by the operating system.

     [-x xfile(s)]
          An optional list of archive members to be excluded from
          processing.

OPTIONS
     -1   list  filenames  only,  one  per  line.   This   option
          excludes all others; headers, trailers and zipfile com-
          ments are never printed.  It is  intended  for  use  in
          Unix shell scripts.

     -2   list filenames 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
          filenames are particularly long.

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

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

     -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 addi-
          tion to the compressed data.

DETAILED DESCRIPTION
     zipinfo has a number of  modes,  and  its  behavior  can  be
     rather  difficult  to fathom if one isn't familiar with Unix
     ls(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 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;  but  if  the  file  is
     encrypted, zipinfo notes this fact by capitalizing the char-
     acter  (`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
     (explained in PKWare's APPNOTE.TXT).  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 by PKWARE for  authenticity  verifica-
     tion  and possibly other purposes, and by Info-ZIP's zip 1.6
     and later to store OS/2, Macintosh and VMS file  attributes.
     This  example  presumably falls into the latter class, then.
     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 Sys-
     tem (HPFS), MS-DOS, OS/2 or NT with  File  Allocation  Table
     (FAT) file system, and Macintosh.  These are denoted as fol-
     lows:

-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--.exe,  .com,  .bat,  .cmd  and  .btm
     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 Macin-
     tosh 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 deflat-
     ing.  In addition, there are  four  levels  of  reducing  (1
     through  4);  four types of imploding (4K or 8K sliding dic-
     tionary, and 2 or 3 Shannon-Fano trees); and four levels  of
     deflating  (superfast,  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 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 ori-
     ginal 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 addition to individual file information, a  default  zip-
     file 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 expli-
     citly.  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.  See the EXAMPLES section
     below for a semi-intelligible translation of this nonsense.

     The verbose listing is self-explanatory.  It also lists file
     comments  and the zipfile comment, if any, and the number of
     bytes of OS/2 extended attributes  stored.   Note  that  the
     latter  number will in general 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.

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.   (Try  not  to laugh.)
     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 indivi-
     dual 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:

        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 lowercase)

     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  accom-
     plished  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 nice(1).

EXAMPLES
     To get a basic, short-format listing of  the  complete  con-
     tents  of  a  ZIP  archive storage.zip, 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:

        zipinfo -l storage

     To list the complete contents of the archive without  header
     and  totals  lines,  either  negate the -h and -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  option
     explicitly,  since the -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 option, like -m and -l, includes headers and  footers
     by  default, unless otherwise specified.  Since the environ-
     ment variable specified no footers and  that  has  a  higher
     precedence  than  the default behavior of -s, an explicit -t
     option was necessary to produce the full  listing.   Nothing
     was  indicated  about  the header, however, so the -s option
     was sufficient.  Note that both the -h and -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 zipinfo is used with
     a wildcard zipfile specification; the contents of  all  zip-
     files 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 may be specified  expli-
     citly:

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

     Finally, to get maximal information about the  ZIP  archive,
     use the verbose option.  It is usually wise to pipe the out-
     put into a filter such as more(1):

        zipinfo -v storage | more

TIPS
     The author finds it convenient to define  an  alias  ii  for
     zipinfo  on  systems  which allow aliases (or, on other sys-
     tems, copy/rename the executable, create a link or create  a
     command  file with the name ii).  The ii usage parallels the
     common ll alias for long listings in Unix, and the  similar-
     ity between the outputs of the two commands was intentional.

BUGS
     None known at this time, but we're always delighted to  find
     a good one.

SEE ALSO
     ls(1), funzip(1), unzip(1), zip(1), zipcloak(1), zipnote(1),
     zipsplit(1)

AUTHOR
     Greg Roelofs (a.k.a. Cave Newt).  ZipInfo contains  pattern-
     matching  code  by Mark Adler, and the OS/2 extra-field code
     is by Kai Uwe Rommel; many other have contributed fixes  and
     improvements.   Please  refer  to  the  CONTRIBS file in the
     UnZip source distribution for a more complete list.

Info-ZIP             Last change:  7 Feb 94                  v2.0

__________________________________________________________________________


UNZIP(1L)              LOCAL USER COMMANDS              UNZIP(1L)

NAME
     unzip - list, test and extract compressed  files  in  a  ZIP
     archive

SYNOPSIS
     unzip [-Z] [-cflptuvz[ajnoqsUV$]]  file[.zip]  [file(s) ...]
     [-x xfile(s) ...] [-d exdir]

DESCRIPTION
     unzip 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,  zip(1L),  creates  ZIP
     archives;  both  programs are compatible with PKWARE's PKZIP
     and PKUNZIP for MS-DOS.

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  sys-
          tem).   Only  the  filename can be a wildcard; the path
          itself cannot.  Wildcard  expressions  are  similar  to
          Unix egrep(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 `^') fol-
               lows the left bracket, then the range  of  charac-
               ters within the brackets is complemented (that is,
               anything except 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 sup-
          ported; just specify the .exe suffix  (if  any)  expli-
          citly.

     [file(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 modi-
          fied by the operating system.

     [-x xfile(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 subdirec-
          tories.  Without the -x option, all C source  files  in
          all directories within the zipfile would be extracted.

     [-d exdir]
          An optional directory to which to  extract  files.   By
          default,  all files and subdirectories are recreated in
          the current directory; the -d option allows  extraction
          in an arbitrary directory (always assuming one has per-
          mission 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 file(s) and the -x option.

OPTIONS
     -Z   zipinfo(1) mode.  If the first option  on  the  command
          line  is  -Z,  the  remaining  options  are taken to be
          zipinfo(1) options.  See the  appropriate  manual  page
          for a description of these options.

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

     -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  unzip  queries  before
          overwriting,  but the -o option may be used to suppress
          the queries.

     -l   list  archive  files   (short   format).    The   name,
          uncompressed  file  size and modification date and time
          of each specified file is printed,  along  with  totals
          for all files specified.  If a file was archived from a
          single-case file system (for example,  the  MS-DOS  FAT
          file  system)  and  the  -U  option  was not given, the
          filename is converted to lowercase and is prefixed with
          a  caret  (^).   In  addition,  the archive comment and
          individual file comments (if any) are displayed.

     -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   test archive files.  This option extracts  each  speci-
          fied file in memory and compares the CRC (cyclic redun-
          dancy check, an enhanced checksum) of the expanded file
          with the original file's stored CRC value.

     -u   update existing files and create new  ones  if  needed.
          This  option  performs  the  same  function  as  the -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.

     -v   list archive files (verbose format).   In  addition  to
          the information given by the -l option, the compression
          method, compressed size, compression ratio  and  32-bit
          CRC is listed.

     -z   display only the archive comment.

MODIFIERS
     -a   convert text files.  Ordinarily all files are extracted
          exactly  as they are stored (as ``binary'' files).  The
          -a option causes files identified by zip as text  files
          (those  with  the `t' label in zipinfo listings, rather
          than `b') to be automatically extracted as  such,  con-
          verting  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  car-
          riage  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 Sys-
          tem use EBCDIC rather than the more common ASCII  char-
          acter  set,  and  NT supports Unicode.) Note that zip's
          identification of text files is by  no  means  perfect;
          some  ``text''  files  may  actually be binary and vice
          versa.    unzip   therefore   prints   ``[text]''    or
          ``[binary]''  as  a  visual  check  for  each  file  it
          extracts when using the  -a  option.   The  -aa  option
          forces all files to be extracted as text, regardless of
          the supposed file type.

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

     -n   never overwrite existing  files.   If  a  file  already
          exists,  skip  the  extraction  of  that  file  without
          prompting.  By default unzip 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   overwrite existing files without prompting.  This is  a
          dangerous  option,  so  use it with care.  (It is often
          used with -f, however.)

     -q   perform operations quietly (-qq = even quieter).  Ordi-
          narily  unzip  prints  the  names  of  the  files  it's
          extracting or testing, the extraction methods, any file
          or zipfile comments which may be stored in the archive,
          and possibly a summary when finished with each archive.
          The  -q[q] options suppress the printing of some or all
          of these messages.

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

     -U   leave filenames uppercase if created under MS-DOS, VMS,
          etc.   Depending  on the archiver, files archived under
          single-case filesystems may be stored as  all-uppercase
          names;  this  can be awkward when extracting to a case-
          preserving filesystem such as  OS/2  HPFS  or  a  case-
          sensitive  one  such  as  under Unix.  By default unzip
          converts  such  filenames  to  lowercase;  this  option
          causes all filenames to be extracted exactly as they're
          stored (excepting truncation, conversion of unsupported
          characters, etc.).

     -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   [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 unzip 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.

ENVIRONMENT OPTIONS
     unzip'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 -q, -a,  -o,
     or  -n  modifiers:   make  unzip quieter by default, make it
     auto-convert text files, or  make  it  always  overwrite  or
     never  overwrite files as it extracts them.  For example, to
     make unzip  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
        set UNZIP=-qq             OS/2 or MS-DOS
        define UNZIP_OPTS "-qq"   VMS (quotes for lowercase)

     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 over-
     ride  an  environment option, one may use the ``minus opera-
     tor'' to remove it.  For instance, to override  one  of  the
     quiet-flags in the example above, use the command

        unzip --q[other options] zipfile

     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  can-
     cel 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  confus-
     ing,  but it is reasonably intuitive:  just ignore the first
     hyphen and go from there.  It is also  consistent  with  the
     behavior of Unix nice(1).

EXAMPLES
     To  use  unzip  to  extract  all  members  of  the   archive
     letters.zip  into  the  current directory and subdirectories
     below it, creating any subdirectories as necessary:

        unzip letters

     To extract all  members  of  letters.zip  into  the  current
     directory only:

        unzip -j letters

     To test letters.zip, printing only a summary  message  indi-
     cating whether the archive is OK or not:

        unzip -tq letters

     To extract to standard output  all  members  of  letters.zip
     whose  names  end in .tex, auto-converting to the local end-
     of-line convention and piping the output into more(1):

        unzip -ca letters \*.tex | more

     (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 example below.)  To
     extract  the  binary  file paper1.dvi 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 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):

        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

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

        unzip -l file

     To do a doubly quiet listing:

        unzip -ql file

     To do a standard listing:

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

TIPS
     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 sim-
     ply  type ``tt zipfile'' to test an archive, something which
     is worth making a habit of  doing.   With  luck  unzip  will
     report  ``No  errors  detected in zipfile.zip,'' after which
     one may breathe a sigh of relief.

BUGS
     [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, unzip may
     hang   the  system,  requiring  a  reboot.   Instead,  press
     control-C (or control-Break) to terminate unzip.

     Under DEC Ultrix, unzip 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 sys-
     tem 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 sys-
     tem; unzip has no way to determine whether the stored attri-
     butes are newer or older than the existing ones.

     [VMS] When extracting to another directory, only the  [.foo]
     syntax  is  accepted  for the -d option; the simple Unix foo
     syntax is silently  ignored  (as  is  the  less  common  VMS
     foo.dir syntax).

     [VMS] When the file being extracted already exists,  unzip'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.

SEE ALSO
     funzip(1L), zip(1L), zipcloak(1L), zipgrep(1L), zipinfo(1L),
     zipnote(1L), zipsplit(1L)

AUTHORS
     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  (VMS),  John  Bush  and  Paul Kienitz (Amiga),
     Antoine Verheijen (Macintosh), Chris Herborth (Atari), Henry
     Gessau  (NT), 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 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 more complete list.

VERSIONS
     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, maint.)
     v5.0  21 Aug 92  Info-ZIP (zip-bugs subgroup; GRR, maint.)
     v5.1   7 Feb 94  Info-ZIP (zip-bugs subgroup; GRR, maint.)

Info-ZIP             Last change:  7 Feb 94                  v5.1

__________________________________________________________________________


FUNZIP(1)                USER COMMANDS                  FUNZIP(1)

NAME
     funzip - extract from a ZIP archive file as a filter

SYNOPSIS
     [...]  |  funzip [ -password ]  |  [...]

     funzip [ -password ]  input.zip |  [...]

ARGUMENTS
     [-password]
          Optional  password  to  be  used  if  ZIP  archive   is
          encrypted.   Decryption  may  not  be supported at some
          sites.  See DESCRIPTION for more details.

DESCRIPTION
     funzip acts as a filter; that is,  it  assumes  that  a  ZIP
     archive  is being piped into standard input, and it extracts
     the first member from the archive to stdout.  If there is an
     argument,  then  the  input  comes  from  the specified file
     instead of from stdin.  A password for encrypted  zip  files
     can  be  specified  on  the command line (preceding the file
     name, if any) by prefixing the password with a dash.  If the
     first  entry of the zip file is encrypted and no password is
     specified on the command line, then the user is prompted for
     a password, and the password is not echoed on the console.

     Given the limitation on single-member extraction, funzip  is
     most useful in conjunction with a secondary archiver program
     such as tar(1).  The following section includes  an  example
     illustrating this usage in the case of disk backups to tape.

EXAMPLES
     To use funzip to  extract  the  first  member  file  of  the
     archive test.zip and to pipe it into more(1):

          funzip test.zip | more

     To use funzip to test the first member file of test.zip (any
     errors will be reported on standard error):

          funzip test.zip > /dev/null

     To use zip and funzip in place of  compress(1)  and  zcat(1)
     for tape backups:

          tar cf - . | zip -7 | dd of=/dev/nrst0 obs=8k
          dd if=/dev/nrst0 ibs=8k | funzip | tar xf -

     (where, for example, nrst0 is a SCSI tape drive).

BUGS
     When piping an encrypted file into more and allowing  funzip
     to  prompt for password, the terminal may sometimes be reset
     to a non-echo mode.  This is apparently due to a race condi-
     tion  between  the two programs; funzip changes the terminal
     mode to non-echo before more reads its state, and more  then
     ``restores''  the  terminal to this mode before exiting.  To
     recover, run  funzip  on  the  same  file  but  redirect  to
     /dev/null  rather  than  piping  into  more; after prompting
     again for the password, funzip will reset the terminal prop-
     erly.

     There is presently no way to  extract  any  member  but  the
     first  from a ZIP archive.  This would be useful in the case
     where a ZIP archive is included within another archive.   In
     the  case where the first member is a directory, funzip sim-
     ply creates the directory and exits.

     The functionality of  funzip  should  be  incorporated  into
     unzip itself (future release).

SEE ALSO
     unzip(1),  zip(1),  zipcloak(1),   zipinfo(1),   zipnote(1),
     zipsplit(1)

AUTHOR
     Mark Adler (Info-ZIP)

Info-ZIP             Last change:  7 Feb 94                  v3.8


Back to Packer/Depacker