home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / zip21.zip / zip.doc < prev    next >
Text File  |  1996-04-27  |  33KB  |  859 lines

  1.  
  2.  
  3.  
  4. ZIP(1L)                                                   ZIP(1L)
  5.  
  6.  
  7. NAME
  8.        zip,  zipcloak,  zipnote,  zipsplit - package and compress
  9.        (archive) files
  10.  
  11. SYNOPSIS
  12.        zip  [-AcdDeEfFghjklLmoqrSTuvVwXyz@$]  [-b path]  [-n suf-
  13.        fixes]   [-t mmddyy]   [   zipfile  [  file1  file2  ...]]
  14.        [-xi list]
  15.  
  16.        zipcloak [-dhL] [-b path] zipfile
  17.  
  18.        zipnote [-hwL] [-b path] zipfile
  19.  
  20.        zipsplit [-hiLpst] [-n size] [-b path] zipfile
  21.  
  22. DESCRIPTION
  23.        zip is a compression and file packaging utility for  Unix,
  24.        VMS,  MSDOS, OS/2, Windows NT, Minix, Atari and Macintosh.
  25.        It is analogous to a  combination  of  the  UNIX  commands
  26.        tar(1)  and compress(1) and is compatible with PKZIP (Phil
  27.        Katz's ZIP for MSDOS systems).
  28.  
  29.        A companion program  (unzip(1L)),  unpacks  zip  archives.
  30.        The zip and unzip(1L) programs can work with archives pro-
  31.        duced by PKZIP,  and  PKZIP  and  PKUNZIP  can  work  with
  32.        archives  produced  by zip.  zip version 2.1 is compatible
  33.        with PKZIP 2.04.  Note that PKUNZIP  1.10  cannot  extract
  34.        files  produced  by  PKZIP  2.04  or zip 2.1. You must use
  35.        PKUNZIP 2.04g  or  unzip  5.0p1  (or  later  versions)  to
  36.        extract them.
  37.  
  38.        For a brief help on zip and unzip, run each without speci-
  39.        fying any parameters on the command line.
  40.  
  41.        The program is useful for packaging a  set  of  files  for
  42.        distribution;  for  archiving  files;  and for saving disk
  43.        space by temporarily compressing unused files or  directo-
  44.        ries.
  45.  
  46.        The  zip  program puts one or more compressed files into a
  47.        single zip archive, along with information about the files
  48.        (name,  path, date, time of last modification, protection,
  49.        and check  information  to  verify  file  integrity).   An
  50.        entire  directory  structure  can  be  packed  into  a zip
  51.        archive with a single command.  Compression ratios of  2:1
  52.        to 3:1 are common for text files.  zip has one compression
  53.        method (deflation) and can also store files  without  com-
  54.        pression.  zip automatically chooses the better of the two
  55.        for each file to be compressed.
  56.  
  57.        When given the name of an existing zip archive,  zip  will
  58.        replace  identically  named  entries in the zip archive or
  59.        add entries for new names.  For example, if foo.zip exists
  60.        and  contains  foo/file1  and foo/file2, and the directory
  61.  
  62.  
  63.  
  64.                            13 Apr 1996                          1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ZIP(1L)                                                   ZIP(1L)
  71.  
  72.  
  73.        foo contains the files foo/file1 and foo/file3, then:
  74.  
  75.               zip -r foo foo
  76.  
  77.        will replace foo/file1 in foo.zip  and  add  foo/file3  to
  78.        foo.zip.    After   this,   foo.zip   contains  foo/file1,
  79.        foo/file2, and foo/file3, with  foo/file2  unchanged  from
  80.        before.
  81.  
  82.        If the file list is specified as -@, zip takes the list of
  83.        input files from standard input.  Under UNIX, this  option
  84.        can  be  used  to  powerful effect in conjunction with the
  85.        find(1) command.  For example, to archive all the C source
  86.        files in the current directory and its subdirectories:
  87.  
  88.               find . -name "*.[ch]" -print | zip source -@
  89.  
  90.        (note  that  the  pattern must be quoted to keep the shell
  91.        from expanding it).  zip will also accept  a  single  dash
  92.        ("-")  as  the  zip file name, in which case it will write
  93.        the zip file to standard output, allowing the output to be
  94.        piped to another program. For example:
  95.  
  96.               zip -r - . | dd of=/dev/nrst0 obs=16k
  97.  
  98.        would  write  the  zip  output directly to a tape with the
  99.        specified block size for the purpose  of  backing  up  the
  100.        current directory.
  101.  
  102.        zip also accepts a single dash ("-") as the name of a file
  103.        to be compressed, in which case it will read the file from
  104.        standard  input,  allowing  zip to take input from another
  105.        program. For example:
  106.  
  107.               tar cf - . | zip backup -
  108.  
  109.        would compress the output of the tar command for the  pur-
  110.        pose  of  backing up the current directory. This generally
  111.        produces better  compression  than  the  previous  example
  112.        using  the  -r  option,  because zip can take advantage of
  113.        redundancy between files. The backup can be restored using
  114.        the command
  115.  
  116.               unzip -p backup | tar xf -
  117.  
  118.        When  no zip file name is given and stdout is not a termi-
  119.        nal, zip acts as a filter, compressing standard  input  to
  120.        standard output.  For example,
  121.  
  122.               tar cf - . | zip | dd of=/dev/nrst0 obs=16k
  123.  
  124.        is equivalent to
  125.  
  126.               tar cf - . | zip - - | dd of=/dev/nrst0 obs=16k
  127.  
  128.  
  129.  
  130.                            13 Apr 1996                          2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ZIP(1L)                                                   ZIP(1L)
  137.  
  138.  
  139.        zip  archives created in this manner can be extracted with
  140.        the program funzip which is provided in the unzip package,
  141.        or  by  gunzip  which is provided in the gzip package. For
  142.        example:
  143.  
  144.        dd if=/dev/nrst0  ibs=16k | funzip | tar xvf -
  145.  
  146.        When changing an existing zip archive, zip  will  write  a
  147.        temporary file with the new contents, and only replace the
  148.        old one when the process of creating the new  version  has
  149.        been completed without error.
  150.  
  151.        If  the name of the zip archive does not contain an exten-
  152.        sion, the extension .zip is added.  If  the  name  already
  153.        contains  an extension other than .zip the existing exten-
  154.        sion is kept unchanged.
  155.  
  156. OPTIONS
  157.        -A     Adjust self-extracting executable archive.  A self-
  158.               extracting   executable   archive   is  created  by
  159.               prepending the SFX stub to an existing archive. The
  160.               -A  option  tells  zip  to adjust the entry offsets
  161.               stored in the archive to  take  into  account  this
  162.               "preamble" data.
  163.  
  164.        -b path
  165.               Use  the  specified  path  for  the  temporary  zip
  166.               archive. For example:
  167.  
  168.                      zip -b /tmp stuff *
  169.  
  170.               will put the temporary zip archive in the directory
  171.               /tmp,  copying over stuff.zip to the current direc-
  172.               tory when done. This option  is  only  useful  when
  173.               updating  an  existing archive, and the file system
  174.               containing this old archive does  not  have  enough
  175.               space  to hold both old and new archive at the same
  176.               time.
  177.  
  178.        -c     Add one-line comments for each file.   File  opera-
  179.               tions  (adding,  updating)  are done first, and the
  180.               user is then prompted for a  one-line  comment  for
  181.               each  file.   Enter the comment followed by return,
  182.               or just return for no comment.
  183.  
  184.        -d     Remove (delete) entries from a  zip  archive.   For
  185.               example:
  186.  
  187.                      zip -d foo foo/tom/junk foo/harry/\* \*.o
  188.  
  189.               will  remove  the  entry  foo/tom/junk,  all of the
  190.               files that start with foo/harry/, and  all  of  the
  191.               files  that  end  with .o (in any path).  Note that
  192.               shell pathname expansion has  been  inhibited  with
  193.  
  194.  
  195.  
  196.                            13 Apr 1996                          3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ZIP(1L)                                                   ZIP(1L)
  203.  
  204.  
  205.               backslashes,  so  that  zip  can see the asterisks,
  206.               enabling zip to match on the contents  of  the  zip
  207.               archive  instead  of  the  contents  of the current
  208.               directory.
  209.  
  210.               Under MSDOS, -d is case sensitive when  it  matches
  211.               names  in the zip archive.  This requires that file
  212.               names be entered in upper case if they were  zipped
  213.               by PKZIP on an MSDOS system.
  214.  
  215.        -D     Do not create entries in the zip archive for direc-
  216.               tories.  Directory entries are created  by  default
  217.               so  that  their  attributes can be saved in the zip
  218.               archive.  The environment variable  ZIPOPT  can  be
  219.               used  to  change  the  default options. For example
  220.               under Unix with sh:
  221.  
  222.                      ZIPOPT="-D"; export ZIPOPT
  223.  
  224.               (The variable ZIPOPT can be  used  for  any  option
  225.               except  -i and -x and can include several options.)
  226.               The option -D is a shorthand for -x  "*/"  but  the
  227.               latter cannot be set as default in the ZIPOPT envi-
  228.               ronment variable.
  229.  
  230.        -e     Encrypt the contents of the  zip  archive  using  a
  231.               password  which  is  entered  on  the  terminal  in
  232.               response to a prompt (this will not be  echoed;  if
  233.               standard  error is not a tty, zip will exit with an
  234.               error).  The password prompt is  repeated  to  save
  235.               the user from typing errors.
  236.  
  237.        -f     Replace  (freshen)  an  existing  entry  in the zip
  238.               archive only if it has been modified more  recently
  239.               than the version already in the zip archive; unlike
  240.               the update option (-u) this will not add files that
  241.               are not already in the zip archive.  For example:
  242.  
  243.                      zip -f foo
  244.  
  245.               This  command should be run from the same directory
  246.               from which the original zip command was run,  since
  247.               paths stored in zip archives are always relative.
  248.  
  249.               Note  that  the  timezone  environment  variable TZ
  250.               should be set according to the  local  timezone  in
  251.               order  for  the -f , -u and -o options to work cor-
  252.               rectly.
  253.  
  254.               The reasons behind this  are  somewhat  subtle  but
  255.               have  to  do with the differences between the Unix-
  256.               format file times (always in GMT) and most  of  the
  257.               other operating systems (always local time) and the
  258.               necessity to compare the two.  A typical  TZ  value
  259.  
  260.  
  261.  
  262.                            13 Apr 1996                          4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. ZIP(1L)                                                   ZIP(1L)
  269.  
  270.  
  271.               is ``MET-1METDST'' (Middle European time with auto-
  272.               matic adjustment  for  ``summertime''  or  Daylight
  273.               Savings Time).
  274.  
  275.        -F     Fix  the  zip  archive.  This option can be used if
  276.               some portions of the archive are missing. It is not
  277.               guaranteed  to  work,  so you MUST make a backup of
  278.               the original archive first.
  279.  
  280.               When doubled as in -FF the compressed  sizes  given
  281.               inside  the damaged archive are not trusted and zip
  282.               scans for special signatures to identify the limits
  283.               between  the archive members. The single -F is more
  284.               reliable if the archive is not  too  much  damaged,
  285.               for  example  if it has only been truncated, so try
  286.               this option first.
  287.  
  288.               Neither option will recover archives that have been
  289.               incorrectly  transferred  in  ascii mode instead of
  290.               binary. After the repair, the -t  option  of  unzip
  291.               may show that some files have a bad CRC. Such files
  292.               cannot be recovered; you can remove them  from  the
  293.               archive using the -d option of zip.
  294.  
  295.        -g     Grow (append to) the specified zip archive, instead
  296.               of creating a new one. If this operation fails, zip
  297.               attempts  to  restore  the  archive to its original
  298.               state. If the restoration fails, the archive  might
  299.               become corrupted.
  300.  
  301.        -h     Display the zip help information (this also appears
  302.               if zip is run with no arguments).
  303.  
  304.        -i files
  305.               Include only the specified files, as in:
  306.  
  307.                      zip -r foo . -i \*.c
  308.  
  309.               which will include only the files that end in .c in
  310.               the current directory and its subdirectories. (Note
  311.               for PKZIP users: the equivalent command is
  312.  
  313.                      pkzip -rP foo *.c
  314.  
  315.               PKZIP does not allow recursion in directories other
  316.               than  the  current  one.)  The backslash avoids the
  317.               shell  filename  substitution,  so  that  the  name
  318.               matching  is performed by zip at all directory lev-
  319.               els.
  320.  
  321.        -j     Store just the name  of  a  saved  file  (junk  the
  322.               path),   and  do  not  store  directory  names.  By
  323.               default, zip will store the full path (relative  to
  324.               the current path).
  325.  
  326.  
  327.  
  328.                            13 Apr 1996                          5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. ZIP(1L)                                                   ZIP(1L)
  335.  
  336.  
  337.        -J     Strip any prepended data (e.g. a SFX stub) from the
  338.               archive.
  339.  
  340.        -k     Attempt to convert the names and paths  to  conform
  341.               to  MSDOS, store only the MSDOS attribute (just the
  342.               user write attribute from UNIX), and mark the entry
  343.               as  made  under MSDOS (even though it was not); for
  344.               compatibility with PKUNZIP under MSDOS which cannot
  345.               handle certain names such as those with two dots.
  346.  
  347.        -l     Translate  the  Unix  end-of-line character LF into
  348.               the MSDOS convention CR LF. This option should  not
  349.               be  used  on binary files.  This option can be used
  350.               on Unix if the zip file  is  intended  for  PKUNZIP
  351.               under  MSDOS. If the input files already contain CR
  352.               LF, this option adds an extra CR. This ensure  that
  353.               unzip -a on Unix will get back an exact copy of the
  354.               original file, to undo the effect of zip -l.
  355.  
  356.        -ll    Translate the MSDOS end-of-line CR LF into Unix LF.
  357.               This  option  should  not  be used on binary files.
  358.               This option can be used on MSDOS if the zip file is
  359.               intended for unzip under Unix.
  360.  
  361.        -L     Display the zip license.
  362.  
  363.        -m     Move  the  specified  files  into  the zip archive;
  364.               actually, this deletes the target directories/files
  365.               after making the specified zip archive. If a direc-
  366.               tory becomes empty after removal of the files,  the
  367.               directory  is  also  removed. No deletions are done
  368.               until zip has created the  archive  without  error.
  369.               This  is  useful  for conserving disk space, but is
  370.               potentially dangerous so it is recommended  to  use
  371.               it  in  combination  with  -T  to  test the archive
  372.               before removing all input files.
  373.  
  374.        -n suffixes
  375.               Do not attempt to compress  files  named  with  the
  376.               given  suffixes.   Such files are simply stored (0%
  377.               compression) in the output zip file,  so  that  zip
  378.               doesn't  waste  its  time  trying to compress them.
  379.               The suffixes are  separated  by  either  colons  or
  380.               semicolons.  For example:
  381.  
  382.                      zip -rn .Z:.zip:.tiff:.gif:.snd  foo foo
  383.  
  384.               will  copy  everything  from  foo into foo.zip, but
  385.               will store any files that end in .Z,  .zip,  .tiff,
  386.               .gif,  or  .snd  without  trying  to  compress them
  387.               (image and sound files often have  their  own  spe-
  388.               cialized  compression  methods).   By  default, zip
  389.               does not compress files with extensions in the list
  390.               .Z:.zip:.zoo:.arc:.lzh:.arj.  Such files are stored
  391.  
  392.  
  393.  
  394.                            13 Apr 1996                          6
  395.  
  396.  
  397.  
  398.  
  399.  
  400. ZIP(1L)                                                   ZIP(1L)
  401.  
  402.  
  403.               directly in the output  archive.   The  environment
  404.               variable  ZIPOPT  can be used to change the default
  405.               options. For example under Unix with csh:
  406.  
  407.                      setenv ZIPOPT "-n .gif:.zip"
  408.  
  409.               To attempt compression on all files, use:
  410.  
  411.                      zip -n : foo
  412.  
  413.               The maximum compression  option  -9  also  attempts
  414.               compression on all files regardless of extension.
  415.  
  416.        -o     Set  the "last modified" time of the zip archive to
  417.               the latest  (oldest)  "last  modified"  time  found
  418.               among  the entries in the zip archive.  This can be
  419.               used without any other operations, if desired.  For
  420.               example:
  421.  
  422.               zip -o foo
  423.  
  424.               will  change  the  last modified time of foo.zip to
  425.               the latest time of the entries in foo.zip.
  426.  
  427.        -q     Quiet mode; eliminate  informational  messages  and
  428.               comment  prompts.   (Useful,  for example, in shell
  429.               scripts and background tasks).
  430.  
  431.        -r     Travel the  directory  structure  recursively;  for
  432.               example:
  433.  
  434.                      zip -r foo foo
  435.  
  436.               In  this case, all the files and directories in foo
  437.               are saved in a zip archive named foo.zip, including
  438.               files  with  names  starting  with  ".",  since the
  439.               recursion does not use the shell's  file-name  sub-
  440.               stitution mechanism.  If you wish to include only a
  441.               specific subset of the files in directory  foo  and
  442.               its  subdirectories,  use  the -i option to specify
  443.               the pattern of files to be  included.   You  should
  444.               not  use  -r with the name ".*", since that matches
  445.               ".."  which will  attempt  to  zip  up  the  parent
  446.               directory (probably not what was intended).
  447.  
  448.        -S     Include  system  and  hidden  files. This option is
  449.               effective on some systems only; it  is  ignored  on
  450.               Unix.
  451.  
  452.        -t mmddyy
  453.               Do not operate on files modified prior to the spec-
  454.               ified date, where mm is the month (0-12), dd is the
  455.               day  of  the  month (1-31), and yy are the last two
  456.               digits of the year.  For example:
  457.  
  458.  
  459.  
  460.                            13 Apr 1996                          7
  461.  
  462.  
  463.  
  464.  
  465.  
  466. ZIP(1L)                                                   ZIP(1L)
  467.  
  468.  
  469.                      zip -rt 120791 infamy foo
  470.  
  471.               will add all the files in foo and  its  subdirecto-
  472.               ries that were last modified on or after 7 December
  473.               1991, to the zip archive infamy.zip.
  474.  
  475.        -T     Test the integrity of the  new  zip  file.  If  the
  476.               check  fails,  the  old  zip  file is unchanged and
  477.               (with the -m option) not input files are removed.
  478.  
  479.        -u     Replace (update)  an  existing  entry  in  the  zip
  480.               archive  only if it has been modified more recently
  481.               than the version already in the zip  archive.   For
  482.               example:
  483.  
  484.                      zip -u stuff *
  485.  
  486.               will  add  any  new files in the current directory,
  487.               and update any files which have been modified since
  488.               the zip archive stuff.zip was last created/modified
  489.               (note that zip will not try to pack stuff.zip  into
  490.               itself when you do this).
  491.  
  492.               Note that the -u option with no arguments acts like
  493.               the -f (freshen) option.
  494.  
  495.        -v     Verbose mode or print diagnostic version info.
  496.  
  497.               Normally, when applied  to  real  operations,  this
  498.               option  enables the display of a progress indicator
  499.               during compression and requests verbose  diagnostic
  500.               info about zipfile structure oddities.
  501.  
  502.               When -v is the only command line argument, and std-
  503.               out is not  redirected  to  a  file,  a  diagnostic
  504.               screen  is  printed. In addition to the help screen
  505.               header with  program  name,  version,  and  release
  506.               date,  some  pointers to the Info-ZIP home and dis-
  507.               tribution sites are given. Then, it shows  informa-
  508.               tion  about  the  target environment (compiler type
  509.               and version, OS version, compilation date  and  the
  510.               enabled  optional  features  used to create the zip
  511.               executable.
  512.  
  513.        -V     Save VMS file attributes. This option is  available
  514.               on  VMS only; zip archives created with this option
  515.               will generally not be usable on other systems.
  516.  
  517.        -w     Append the version number of the files to the name,
  518.               including  multiple  versions of files.  (VMS only;
  519.               default: use only the  most  recent  version  of  a
  520.               specified file).
  521.  
  522.  
  523.  
  524.  
  525.  
  526.                            13 Apr 1996                          8
  527.  
  528.  
  529.  
  530.  
  531.  
  532. ZIP(1L)                                                   ZIP(1L)
  533.  
  534.  
  535.        -x files
  536.               Explicitly exclude the specified files, as in:
  537.  
  538.                      zip -r foo foo -x \*.o
  539.  
  540.               which  will  include the contents of foo in foo.zip
  541.               while excluding all the files that end in .o.   The
  542.               backslash  avoids  the shell filename substitution,
  543.               so that the name matching is performed  by  zip  at
  544.               all directory levels.
  545.  
  546.        -X     Do   not   save  extra  file  attributes  (Extended
  547.               Attributes on  OS/2,  uid/gid  and  file  times  on
  548.               Unix).
  549.  
  550.        -y     Store  symbolic  links  as such in the zip archive,
  551.               instead  of  compressing  and  storing   the   file
  552.               referred to by the link (UNIX only).
  553.  
  554.        -z     Prompt  for a multi-line comment for the entire zip
  555.               archive.  The comment is ended by a line containing
  556.               just  a  period, or an end of file condition (^D on
  557.               UNIX, ^Z on MSDOS, OS/2, and VAX/VMS).  The comment
  558.               can be taken from a file:
  559.  
  560.                      zip -z foo < foowhat
  561.  
  562.        -#     Regulate  the speed of compression using the speci-
  563.               fied digit #, where  -0  indicates  no  compression
  564.               (store  all  files),  -1 indicates the fastest com-
  565.               pression method (less compression) and -9 indicates
  566.               the  slowest  compression  method (optimal compres-
  567.               sion, ignores the suffix list).  The  default  com-
  568.               pression level is -6.
  569.  
  570.        -@     Take  the  list of input files from standard input.
  571.               File names containing spaces must be  quoted  using
  572.               single quotes, as in 'file name'.
  573.  
  574.        -$     Include  the volume label for the the drive holding
  575.               the first file to be compressed.  If  you  want  to
  576.               include  only  the  volume label or to force a spe-
  577.               cific drive, use the drive name as first file name,
  578.               as in:
  579.  
  580.                      zip -$ foo a: c:bar
  581.  
  582.               This  option  is  effective  on  some  systems only
  583.               (MSDOS and OS/2); it is ignored on Unix.
  584.  
  585. EXAMPLES
  586.        The simplest example:
  587.  
  588.               zip stuff *
  589.  
  590.  
  591.  
  592.                            13 Apr 1996                          9
  593.  
  594.  
  595.  
  596.  
  597.  
  598. ZIP(1L)                                                   ZIP(1L)
  599.  
  600.  
  601.        creates the archive stuff.zip (assuming it does not exist)
  602.        and  puts all the files in the current directory in it, in
  603.        compressed form (the .zip suffix is  added  automatically,
  604.        unless  that  archive  name  given contains a dot already;
  605.        this allows the explicit specification of other suffixes).
  606.  
  607.        Because  of  the way the shell does filename substitution,
  608.        files starting with "." are not included; to include these
  609.        as well:
  610.  
  611.               zip stuff .* *
  612.  
  613.        Even  this  will  not  include any subdirectories from the
  614.        current directory.
  615.  
  616.        To zip up an entire directory, the command:
  617.  
  618.               zip -r foo foo
  619.  
  620.        creates the archive foo.zip, containing all the files  and
  621.        directories  in the directory foo that is contained within
  622.        the current directory.
  623.  
  624.        You may want to make a zip archive that contains the files
  625.        in  foo,  without  recording the directory name, foo.  You
  626.        can use the -j option to leave off the paths, as in:
  627.  
  628.               zip -j foo foo/*
  629.  
  630.        If you are short on disk space, you might not have  enough
  631.        room  to  hold  both the original directory and the corre-
  632.        sponding compressed zip archive.  In this  case,  you  can
  633.        create  the  archive in steps using the -m option.  If foo
  634.        contains the subdirectories tom, dick, and harry, you can:
  635.  
  636.               zip -rm foo foo/tom
  637.               zip -rm foo foo/dick
  638.               zip -rm foo foo/harry
  639.  
  640.        where  the first command creates foo.zip, and the next two
  641.        add to it.  At the completion of  each  zip  command,  the
  642.        last  created archive is deleted, making room for the next
  643.        zip command to function.
  644.  
  645. PATTERN MATCHING
  646.        This section applies only to UNIX.  Watch this  space  for
  647.        details on MSDOS and VMS operation.
  648.  
  649.        The  UNIX  shells (sh(1) and csh(1)) do filename substitu-
  650.        tion on command arguments.  The special characters are:
  651.  
  652.        ?      match any single character
  653.  
  654.        *      match any number of characters (including none)
  655.  
  656.  
  657.  
  658.                            13 Apr 1996                         10
  659.  
  660.  
  661.  
  662.  
  663.  
  664. ZIP(1L)                                                   ZIP(1L)
  665.  
  666.  
  667.        []     match any character in the range  indicated  within
  668.               the brackets (example: [a-f], [0-9]).
  669.  
  670.        When  these  characters  are  encountered  (without  being
  671.        escaped with a backslash or quotes), the shell  will  look
  672.        for files relative to the current path that match the pat-
  673.        tern, and replace the argument with a list  of  the  names
  674.        that matched.
  675.  
  676.        The zip program can do the same matching on names that are
  677.        in the zip archive being modified or, in the case  of  the
  678.        -x (exclude) or -i (include) options, on the list of files
  679.        to be operated on, by using backslashes or quotes to  tell
  680.        the  shell not to do the name expansion.  In general, when
  681.        zip encounters a name in the list of files to do, it first
  682.        looks for the name in the file system.  If it finds it, it
  683.        then adds it to the list of files to do.  If it  does  not
  684.        find  it,  it  looks for the name in the zip archive being
  685.        modified (if it exists), using the pattern matching  char-
  686.        acters  described  above,  if present.  For each match, it
  687.        will add that name to the list of files to  be  processed,
  688.        unless  this name matches one given with the -x option, or
  689.        does not match any name given with the -i option.
  690.  
  691.        The pattern matching includes the path,  and  so  patterns
  692.        like \*.o match names that end in ".o", no matter what the
  693.        path prefix is.  Note  that  the  backslash  must  precede
  694.        every  special  character (i.e. ?*[]), or the entire argu-
  695.        ment must be enclosed in double quotes ("").
  696.  
  697.        In general, use backslash  to  make  zip  do  the  pattern
  698.        matching  with  the  -f (freshen) and -d (delete) options,
  699.        and sometimes after the -x (exclude) option when used with
  700.        an appropriate operation (add, -u, -f, or -d).
  701.  
  702. SEE ALSO
  703.        compress(1), shar(1L), tar(1), unzip(1L), gzip(1L)
  704.  
  705. BUGS
  706.        zip  2.1  is not compatible with PKUNZIP 1.10. Use zip 1.1
  707.        to produce zip files which can  be  extracted  by  PKUNZIP
  708.        1.10.
  709.  
  710.        zip  files  produced by zip 2.1 must not be updated by zip
  711.        1.1 or PKZIP 1.10, if they contain encrypted members or if
  712.        they  have  been  produced  in a pipe or on a non-seekable
  713.        device. The old versions of zip or PKZIP would  create  an
  714.        archive  with  an  incorrect format.  The old versions can
  715.        list the contents of the zip file but  cannot  extract  it
  716.        anyway (because of the new compression algorithm).  If you
  717.        do not use encryption and use regular disk files,  you  do
  718.        not have to care about this problem.
  719.  
  720.        Under  VMS,  not  all  of the odd file formats are treated
  721.  
  722.  
  723.  
  724.                            13 Apr 1996                         11
  725.  
  726.  
  727.  
  728.  
  729.  
  730. ZIP(1L)                                                   ZIP(1L)
  731.  
  732.  
  733.        properly.  Only stream-LF format zip files are expected to
  734.        work  with  zip.   Others  can  be  converted  using Rahul
  735.        Dhesi's BILF program.  This version of zip handles some of
  736.        the  conversion internally.  When using Kermit to transfer
  737.        zip files from Vax to MSDOS, type "set file type block" on
  738.        the  Vax.   When  transfering from MSDOS to Vax, type "set
  739.        file type fixed" on the Vax.  In  both  cases,  type  "set
  740.        file type binary" on MSDOS.
  741.  
  742.        Under VMS, zip hangs for file specification that uses DEC-
  743.        net syntax foo::*.*.
  744.  
  745.        On OS/2, zip  cannot  match  some  names,  such  as  those
  746.        including  an  exclamation mark or a hash sign.  This is a
  747.        bug in OS/2 itself:  the  32-bit  DosFindFirst/Next  don't
  748.        find  such names.  Other programs such as GNU tar are also
  749.        affected by this bug.
  750.  
  751.        Under OS/2, the amount of Extended Attributes displayed by
  752.        DIR  is  (for  compatibility)  the  amount returned by the
  753.        16-bit version of DosQueryPathInfo(). Otherwise  OS/2  1.3
  754.        and  2.0  would  report  different  EA sizes when DIRing a
  755.        file.  However,  the  structure  layout  returned  by  the
  756.        32-bit  DosQueryPathInfo()  is  a  bit  different, it uses
  757.        extra padding bytes and link pointers (it's a linked list)
  758.        to have all fields on 4-byte boundaries for portability to
  759.        future RISC OS/2 versions. Therefore the value reported by
  760.        zip  (which  uses this 32-bit-mode size) differs from that
  761.        reported by DIR.  zip stores the 32-bit format for  porta-
  762.        bility,  even  the 16-bit MS-C-compiled version running on
  763.        OS/2 1.3, so even this one shows the 32-bit-mode size.
  764.  
  765.        On the Amiga, the -A option currently does not work.
  766.  
  767. AUTHORS
  768.        Copyright (C) 1990-1996  Mark  Adler,  Richard  B.  Wales,
  769.        Jean-loup  Gailly,  Onno  van  der Linden, Kai Uwe Rommel,
  770.        Igor Mandrichenko, John Bush and Paul Kienitz.  Permission
  771.        is  granted to any individual or institution to use, copy,
  772.        or redistribute this software so long as all of the origi-
  773.        nal  files  are  included, that it is not sold for profit,
  774.        and that this copyright notice is retained.
  775.  
  776.        LIKE ANYTHING ELSE THAT'S FREE,  ZIP  AND  ITS  ASSOCIATED
  777.        UTILITIES  ARE PROVIDED AS IS AND COME WITH NO WARRANTY OF
  778.        ANY KIND, EITHER EXPRESSED OR IMPLIED. IN  NO  EVENT  WILL
  779.        THE  COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES RESULTING
  780.        FROM THE USE OF THIS SOFTWARE.
  781.  
  782.        Please  send  bug  reports  and  comments  by  email   to:
  783.        zip-bugs@wkuvx1.wku.edu.   For bug reports, please include
  784.        the version of zip (see zip-h ), the make options used  to
  785.        compile  it  see zip-v ), the machine and operating system
  786.        in use, and as much additional information as possible.
  787.  
  788.  
  789.  
  790.                            13 Apr 1996                         12
  791.  
  792.  
  793.  
  794.  
  795.  
  796. ZIP(1L)                                                   ZIP(1L)
  797.  
  798.  
  799. ACKNOWLEDGEMENTS
  800.        Thanks to R. P. Byrne for his  Shrink.Pas  program,  which
  801.        inspired this project, and from which the shrink algorithm
  802.        was stolen; to Phil Katz for placing in the public  domain
  803.        the zip file format, compression format, and .ZIP filename
  804.        extension, and for accepting minor  changes  to  the  file
  805.        format;  to  Steve  Burg for clarifications on the deflate
  806.        format; to Haruhiko Okumura and Leonid Broukhis  for  pro-
  807.        viding some useful ideas for the compression algorithm; to
  808.        Keith Petersen, Rich Wales, Hunter Goatley and Mark  Adler
  809.        for providing a mailing list and ftp site for the INFO-ZIP
  810.        group to use; and most importantly, to the INFO-ZIP  group
  811.        itself  (listed  in  the  file  infozip.who) without whose
  812.        tireless testing and bug-fixing  efforts  a  portable  zip
  813.        would  not  have  been  possible.  Finally we should thank
  814.        (blame) the first INFO-ZIP  moderator,  David  Kirschbaum,
  815.        for  getting  us  into  this mess in the first place.  The
  816.        manual page was rewritten for UNIX by R. P. C. Rodgers.
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.                            13 Apr 1996                         13
  857.  
  858.  
  859.