home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / ZOO21E.EXE / ZOO.MAN < prev    next >
Text File  |  1991-07-11  |  51KB  |  1,119 lines

  1.  
  2.  
  3.  
  4.  
  5. July 7, 1991                                               ZOO(1)
  6.  
  7.  
  8.  
  9. NAME
  10.      zoo - manipulate archives of files in compressed form
  11.  
  12. SYNOPSIS
  13.      zoo {acfDeghHlLPTuUvVx}[aAcCdEfghImMnNoOpPqSu1:/.@n+-=]
  14.      archive [file] ...
  15.      zoo -command archive [file] ...
  16.      zoo h
  17.  
  18. DESCRIPTION
  19.      Zoo is used to create and maintain collections of files in
  20.      compressed form.  It uses a Lempel-Ziv compression algorithm
  21.      that gives space savings in the range of 20% to 80% depend-
  22.      ing on the type of file data.  Zoo can store and selectively
  23.      extract multiple generations of the same file.  Data can be
  24.      recovered from damaged archives by skipping the damaged por-
  25.      tion and locating undamaged data with the help of fiz(1).
  26.  
  27.      This documentation is for version 2.1.  Changes from previ-
  28.      ous versions are described in the section labelled CHANGES.
  29.  
  30.      The command zoo h gives a summary of commands.  Extended
  31.      multiscreen help can be obtained with zoo H.
  32.  
  33.      Zoo will not add an archive to itself, nor add the archive's
  34.      backup (with .bak extension to the filename) to the archive.
  35.  
  36.      Zoo has two types of commands:  Expert commands, which con-
  37.      sist of one command letter followed by zero or more modifier
  38.      characters, and Novice commands, which consist of a hyphen
  39.      (`-') followed by a command word that may be abbreviated.
  40.      Expert commands are case-sensitive but Novice commands are
  41.      not.
  42.  
  43.      When zoo adds a file to an existing archive, the default
  44.      action is to maintain one generation of each file in an
  45.      archive and to mark any older generation as deleted.  A
  46.      limit on the number of generations to save can be specified
  47.      by the user for an entire archive, or for each file indivi-
  48.      dually, or both.  Zoo deletes a stored copy of an added file
  49.      if necessary to prevent the number of stored generations
  50.      from exceeding the user-specified limit.
  51.  
  52.      Deleted files may be later undeleted.  Archives may be
  53.      packed to recover space occupied by deleted files.
  54.  
  55.      All commands assume that the archive name ends with the
  56.      characters .zoo unless a different extension is supplied.
  57.  
  58.      Novice commands
  59.  
  60.      Novice commands may be abbreviated to a hyphen followed by
  61.      at least one command character.  Each Novice command works
  62.      in two stages. First, the command does its intended work.
  63.      Then, if the result was that one or more files were deleted
  64.      in the specified archive, the archive is packed.  If packing
  65.      occurs, the original unpacked archive is always left behind
  66.      with an extension of .bak.
  67.  
  68.      No Novice command ever stores the directory prefix of a
  69.      file.
  70.  
  71.      The Novice commands are as follows.
  72.  
  73.      -add    Adds the specified files to the archive.
  74.  
  75.      -freshen
  76.           Adds a specified file to the archive if and only if an
  77.           older file by the same name already exists in the
  78.           archive.
  79.  
  80.      -delete
  81.           Deletes the specified files from the archive.
  82.  
  83.      -update
  84.           Adds a specified file to the archive either:  if an
  85.           older file by the same name already exists in the
  86.           archive or:  if a file by the same name does not
  87.           already exist in the archive.
  88.  
  89.      -extract
  90.           Extracts the specified files from the archive.  If no
  91.           file is specified all files are extracted.
  92.  
  93.      -move
  94.           Equivalent to -add except that source files are deleted
  95.           after addition.
  96.  
  97.      -print
  98.           Equivalent to -extract except that extracted data are
  99.           sent to standard output.
  100.  
  101.      -list
  102.           Gives information about the specified archived files
  103.           including any attached comments.  If no files are
  104.           specified all files are listed.  Deleted files are not
  105.           listed.
  106.  
  107.      -test
  108.           Equivalent to -extract except that the extracted data
  109.           are not saved but any errors encountered are reported.
  110.  
  111.      -comment
  112.           Allows the user to add or update comments attached to
  113.           archived files.  When prompted, the user may:  type a
  114.           carriage return to skip the file, leaving any current
  115.           comment unchanged;  or type a (possibly null) comment
  116.           of up to 32,767 characters terminated by /end (case-
  117.           insensitive) on a separate line;  or type the end-of-
  118.           file character (normally control D) to skip all remain-
  119.           ing files.
  120.  
  121.      -delete
  122.           Deletes the specified files.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.      The correspondence between Novice and Expert commands is as follows.
  134.  
  135.      Novice                                        Equivalent
  136.      Command    Description                        Expert Command
  137.      ____________________________________________________________
  138.      -add       add files to archive               aP:
  139.      -extract   extract files from archive         x
  140.      -move      move files to archive              aMP:
  141.      -test      test archive integrity             xNd
  142.      -print     extract files to standard output   xp
  143.      -delete    delete files from archive          DP
  144.      -list      list archive contents              VC
  145.      -update    add new or newer files             aunP:
  146.      -freshen   by add newer files                 auP:
  147.      -comment   add comments to files              c
  148.  
  149.      Expert commands
  150.  
  151.      The general format of expert commands is:
  152.  
  153.      zoo {acfDeghHlLPTuUvVx}[aAcCdEfghImMnNoOpPqSu1:/.@n+-=]
  154.      archive [file] ...
  155.  
  156.      The characters enclosed within {} are commands.  Choose any
  157.      one of these.  The characters enclosed within [] just to the
  158.      right of the {} are modifiers and zero or more of these may
  159.      immediately follow the command character.  All combinations
  160.      of command and modifier characters may not be valid.
  161.  
  162.      Files are added to an archive with the command:
  163.  
  164.      zoo {au}[cfhIMnPqu:+-] archive [file] ...
  165.  
  166.      Command characters are:
  167.  
  168.      a    Add each specified file to archive.  Any already-
  169.           archived copy of the file is deleted if this is neces-
  170.           sary to avoid exceeding the user-specified limit on the
  171.           number of generations of the file to maintain in the
  172.           archive.
  173.  
  174.      u    Do an update of the archive.  A specified file is added
  175.           to the archive only if a copy of it is already in the
  176.           archive and the copy being added is newer than the copy
  177.           already in the archive.
  178.  
  179.      The following modifiers are specific to these commands.
  180.  
  181.      M    Move files to archive.  This makes zoo delete (unlink)
  182.           the original files after they have been added to the
  183.           archive.  Files are deleted after addition of all files
  184.           to the archive is complete and after any requested
  185.           packing of the archive has been done, and only if zoo
  186.           detected no errors.
  187.  
  188.      n    Add new files only.  A specified file is added only if
  189.           it isn't already in the archive.
  190.  
  191.      h    Use the high performance compression algorithm. This
  192.           option may be used with either the add (a) or filter
  193.           (f) commands to gain extra compression at the expense
  194.           of using somewhat more processor time. Extracting files
  195.           compressed with the method is usually slightly faster
  196.           than those saved with the default method.
  197.  
  198.  
  199.      P    Pack archive after files have been added.
  200.  
  201.      u    Applied to the a command, this modifier makes it behave
  202.           identically to the u command.
  203.  
  204.           The combination of the n modifier with the u modifier
  205.           or u command causes addition of a file to the archive
  206.           either if the file is not already in the archive, or if
  207.           the file is already in the archive but the archived
  208.           copy is older than the copy being added.
  209.  
  210.      :    Do not store directory names.  In the absence of this
  211.           modifier zoo stores the full pathname of each archived
  212.           file.
  213.  
  214.      I    Read filenames to be archived from standard input. Zoo
  215.           will read its standard input and assume that each line
  216.           of text contains a filename.  Under AmigaDOS and the
  217.           **IX family, the entire line is used.  Under MS-DOS and
  218.           VAX/VMS, zoo assumes that the filename is terminated by
  219.           a blank, tab, or newline; thus it is permissible for
  220.           the line of text to contain more than one field
  221.           separated by white space, and only the first field will
  222.           be used.
  223.  
  224.           Under the **IX family of operating systems, zoo can be
  225.           used as follows in a pipeline:
  226.  
  227.                find . -print | zoo aI sources
  228.  
  229.  
  230.  
  231.           If the I modifier is specified, no filenames may be
  232.           supplied on the command line itself.
  233.  
  234.      +,-  These modifiers take effect only if the a command
  235.           results in the creation of a new archive.  + causes any
  236.           newly-created archive to have generations enabled.  -
  237.           is provided for symmetry and causes any newly-created
  238.           archive to have generations disabled;  this is also the
  239.           default if neither + nor - is specified.
  240.  
  241.      Files are extracted from an archive with the command:
  242.  
  243.      zoo {ex}[dNoOpqS./@] archive [file] ...
  244.  
  245.      The e and x commands are synonymous.  If no file was speci-
  246.      fied, all files are extracted from the archive.
  247.  
  248.      The following modifiers are specific to the e and x com-
  249.      mands:
  250.  
  251.      N    Do not save extracted data but report any errors
  252.           encountered.
  253.  
  254.      O    Overwrite files.  Normally, if a file being extracted
  255.           would overwrite an already-existing file of the same
  256.           name, zoo asks you if you really want to overwrite it.
  257.           You may answer the question with `y', which means yes,
  258.           overwrite; or `n', which means no, don't overwrite; or
  259.           `a', which means assume the answer is `y' for this and
  260.           all subsequent files.  The O modifier makes zoo assume
  261.           that files may always be overwritten.  Neither answer-
  262.           ing the question affirmatively nor using O alone will
  263.           cause read-only files to be overwritten.
  264.  
  265.           On **IX systems, however, doubling this modifier as OO
  266.           will force zoo to unconditionally overwrite any read-
  267.           protected files with extracted files if it can do so.
  268.  
  269.           The O, N, and p modifiers are mutually exclusive.
  270.  
  271.      S    Supersede newer files on disk with older extracted
  272.           files.  Unless this modifier is used, zoo will not
  273.           overwrite a newer existing file with an older extracted
  274.           file.
  275.  
  276.      o    This is equivalent to the O modifier if and only if it
  277.           is given at least twice.  It is otherwise ignored.
  278.  
  279.      p    Pipe extracted data to standard output.  Error messages
  280.           are piped to standard output as well.  However, if a
  281.           bad CRC is detected, an error message is sent both to
  282.           standard error and to standard output.
  283.  
  284.      /    Extract to original pathname.  Any needed directories
  285.           must already exist.  In the absence of this modifier
  286.           all files are extracted into the current directory.  If
  287.           this modifier is doubled as //, required directories
  288.           need not exist and are created if necessary.
  289.  
  290.      The management of multiple generations of archived files is
  291.      done with the commands:
  292.  
  293.      zoo gl[Aq]{+-=}number archive files ..
  294.      zoo gc[q]{+-=}number archive files ..
  295.      zoo gA[q]- archive
  296.      zoo gA[q]+ archive
  297.  
  298.      The first form, gl, adjusts the generation limit of selected
  299.      files by the specified value.  If the form =n is used, where
  300.      n is a decimal number, this sets the generation limit to the
  301.      specified value.  If + or - are used in placed of = the
  302.      effect is to increment or decrement the generation limit by
  303.      the specified value.  For example, the command
  304.  
  305.           zoo gl=5 xyz :
  306.  
  307.  
  308.      sets the generation limit of each file in the archive
  309.      xyz.zoo to a value of 5.  The command
  310.  
  311.           zoo gl-3 xyz :
  312.  
  313.  
  314.      decrements the generation limit of each file in the archive
  315.      to 3 less than it currently is.
  316.  
  317.      If the A modifier is used, the archive-wide generation limit
  318.      is adjusted instead.
  319.  
  320.      The number of generations of a file maintained in an archive
  321.      is limited by the file generation limit, or the archive gen-
  322.      eration limit, whichever is lower.  As a special case, a
  323.      generation limit of 0 stands for no limit.  Thus the default
  324.      file generation limit of 0 and archive generation limit of 3
  325.      limits the number of generations of each file in a newly-
  326.      created archive to three.
  327.  
  328.      The generation limit specified should be in the range 0
  329.      through 15;  any higher numbers are interpreted modulo 16.
  330.  
  331.      The second form of the command, using gc, adjusts the gen-
  332.      eration count of selected files.  Each file has a generation
  333.      count of 1 when it is first added to an archive.  Each time
  334.      a file by the same name is added again to an archive, it
  335.      receives a generation count that is one higher than the
  336.      highest generation count of the archived copy of the file.
  337.      The permissible range of generation counts is 1 through
  338.      65535.  If repeated manipulations of an archive result in
  339.      files having very high generation counts, they may be set
  340.      back to lower numbers with the gc command.  The syntax of
  341.      the command is analogous to the syntax of the gl command,
  342.      except that the A modifier is not applicable to the gc com-
  343.      mand.
  344.  
  345.      The third form, gA-, disables generations in an archive.
  346.      Generations are off when an archive is first created, but
  347.      may be enabled with the fourth form of the command, gA+.
  348.      When generations are disabled in an archive, zoo will not
  349.      display generation numbers in archive listings or maintain
  350.      multiple generations.  Generations can be re-enabled at any
  351.      time, though manipulation of an archive with repeated inter-
  352.      spersed gA- and gA+ commands may result in an archive whose
  353.      behavior is not easily understandable.
  354.  
  355.      Archived files are listed with the command:
  356.  
  357.      zoo {lLvV}[aAcCdfgmqvV@/1+-] archive[.zoo] [file] ...
  358.  
  359.      l    Information presented includes the date and time of
  360.           each file, its original and current (compressed) sizes,
  361.           and the percentage size decrease due to compression
  362.           (labelled CF or compression factor).  If a file was
  363.           added to the archive in a different timezone, the
  364.           difference between timezones is shown in hours as a
  365.           signed number.  As an example, if the difference is
  366.           listed as +3, this means that the file was added to the
  367.           archive in a timezone that is 3 hours west of the
  368.           current timezone.  The file time listed is, however,
  369.           always the original timestamp of the archived file, as
  370.           observed by the user who archived the file, expressed
  371.           as that user's local time.  (Timezone information is
  372.           stored and displayed only if the underlying operating
  373.           system knows about timezones.)
  374.  
  375.           If no filename is supplied all files are listed except
  376.           deleted files.
  377.  
  378.           Zoo selects which generation(s) of a file to list
  379.           according to the following algorithm.
  380.  
  381.           If no filename is supplied, only the latest generation
  382.           of each file is listed.  If any filenames are speci-
  383.           fied, and a generation is specified for an argument,
  384.           only the requested generation is listed.  If a filename
  385.           is specified ending with the generation character (`:'
  386.           or `;'), all generations of that file are listed.  Thus
  387.           a filename argument of the form zoo.c will cause only
  388.           the latest generation of zoo.c to be listed;  an argu-
  389.           ment of the form zoo.c:4 will cause generation 4 of
  390.           zoo.c to be listed;  and an argument of the form zoo.c:
  391.           or zoo.c:* will cause all generations of zoo.c to be
  392.           listed.
  393.  
  394.      L    This is similar to the l command except that all sup-
  395.           plied arguments must be archives and all non-deleted
  396.           generations of all files in each archive appear in the
  397.           listing.
  398.  
  399.           On **IX systems, on which the shell expands arguments,
  400.           if multiple archives are to be listed, the L command
  401.           must be used.  On other systems (VAX/VMS, AmigaDOS,
  402.           MSDOS) on which wildcard expansion is done internally
  403.           by zoo, wildcards may be used in the archive name, and
  404.           a multiple archive listing obtained, using the l com-
  405.           mand.
  406.  
  407.      v    This causes any comment attached to the archive to be
  408.           listed in addition to the other information.
  409.  
  410.      V    This causes any comment attached to the archive and
  411.           also any comment attached to each file to be listed.
  412.  
  413.           Both the V and v command characters can also be used as
  414.           modifiers to the l and L commands.
  415.  
  416.      In addition to the general modifiers described later, the
  417.      following modifiers can be applied to the archive list com-
  418.      mands.
  419.  
  420.      a    This gives a single-line format containing both each
  421.           filename and the name of the archive, sorted by archive
  422.           name.  It is especially useful with the L command,
  423.           since the result can be further sorted on any field to
  424.           give a master listing of the entire contents of a set
  425.           of archives.
  426.  
  427.      A    This causes any comment attached to the archive to be
  428.           listed.
  429.  
  430.      g    This modifier causes file generation information to be
  431.           listed about the archive.  For each file listed, the
  432.           user-specified generation limit, if any, is listed.
  433.           For example, `3g' for a file means that the user wants
  434.           no more than three generations of the file to be kept.
  435.           In archives created by older versions of zoo, the list-
  436.           ing will show `-g', meaning that no generation informa-
  437.           tion is kept and multiple generations of the file are
  438.           not being maintained.
  439.  
  440.           In addition to the generation information for each
  441.           file, the archive-wide generation limit, if any, is
  442.           shown at the end of the listing.  If generations have
  443.           been disabled by the user, this is so indicated, for
  444.           example:
  445.  
  446.                Archive generation limit is 3 (generations off).
  447.  
  448.           For more information about generations see the descrip-
  449.           tion of the g command.
  450.  
  451.      m    This modifier is currently applicable to **IX systems
  452.           only.  It causes the mode bits (file protection code)
  453.           of each file to be listed as a three-digit octal
  454.           number.  Currently zoo preserves only the lowest nine
  455.           mode bits.  Their meanings are as described in the **IX
  456.           documentation for the chmod(1) command.
  457.  
  458.      C    This modifier causes the stored cyclic redundancy code
  459.           (CRC) for each archived file to be shown as a four-
  460.           digit hexadecimal number.
  461.  
  462.  
  463.      1    This forces one filename to be listed per line.  It is
  464.           most useful in combination with the f modifier.
  465.  
  466.      /    This forces any directory name to be always listed,
  467.           even in fast columnized listings that do not normally
  468.           include any directory names.
  469.  
  470.      +,-  The - modifier causes trailing generation numbers to be
  471.           omitted from filenames.  The + modifier causes the
  472.           trailing generation numbers to be shown, which is also
  473.           the default if neither - nor + is specified.
  474.  
  475.      Files may be deleted and undeleted from an archive with the
  476.      following commands:
  477.  
  478.      zoo {DU}[Pq1] archive file ...
  479.  
  480.      The D command deletes the specified files and the U command
  481.      undeletes the specified files.  The 1 modifier (the digit
  482.      one, not the letter ell) forces deletion or undeletion of at
  483.      most one file.  If multiple instances of the same file exist
  484.      in an archive, use of the 1 modifier may allow selective
  485.      extraction of one of these.
  486.  
  487.      Comments may be added to an archive with the command:
  488.  
  489.      zoo c[A] archive
  490.  
  491.      Without the modifier A, this behaves identically to the
  492.      -comment command.  With the modifier A, the command serves
  493.      to add or update the comment attached to the archive as a
  494.      whole.  This comment may be listed with the lA, LA, v, and V
  495.      commands.  Applying the cA command to an archive that was
  496.      created with an older version of zoo will result in an error
  497.      message requesting that the user first pack the archive with
  498.      the P command.  This reorganizes the archive and creates
  499.      space for the archive comment.
  500.  
  501.      The timestamp of an archive may be adjusted with the com-
  502.      mand:
  503.  
  504.      zoo T[q] archive
  505.  
  506.      Zoo normally attempts to maintain the timestamp of an
  507.      archive to reflect the age of the newest file stored in it.
  508.      Should the timestamp ever be incorrect it can be fixed with
  509.      the T command.
  510.  
  511.      An archive may be packed with the command:
  512.  
  513.      zoo P[EPq] archive
  514.  
  515.      If the backup copy of the archive already exists, zoo will
  516.      refuse to pack the archive unless the P modifier is also
  517.      given.  The E modifier causes zoo not to save a backup copy
  518.      of the original archive after packing.  A unique temporary
  519.      file in the current directory is used to initially hold the
  520.      packed archive.  This file will be left behind if packing is
  521.      interrupted or if for some reason this file cannot be
  522.      renamed to the name of the original archive when packing is
  523.      complete.
  524.  
  525.      Packing removes any garbage data appended to an archive
  526.      because of Xmodem file transfer and also recovers any wasted
  527.      space remaining in an archive that has been frequently
  528.      updated or in which comments were replaced.  Packing also
  529.      updates the format of any archive that was created by an
  530.      older version of zoo so that newer features (e.g. archive-
  531.      wide generation limit, archive comment) become fully avail-
  532.      able.
  533.  
  534.      Zoo can act as a pure compression or uncompression filter,
  535.      reading from standard input and writing to standard output.
  536.      This is achieved with the command:
  537.  
  538.      zoo f{cu}[h
  539.  
  540.      where c specifies compression, u specifies uncompression,
  541.      and h used in addition requests the high-performance
  542.      compression be used.  A CRC value is used to check the
  543.      integrity of the data.  The compressed data stream has no
  544.      internal archive structure and contains multiple files only
  545.      if the input data stream was already structured, as might be
  546.      obtained, for example, from tar or cpio.
  547.  
  548.       Modem transfers can be speeded up with these commands:
  549.  
  550.                zoo fc < file | sz ... rz | zoo fu > file
  551.  
  552.  
  553.  
  554.      General modifiers
  555.  
  556.      The following modifiers are applicable to several commands:
  557.  
  558.      c    Applied to the a and u commands, this causes the user
  559.           to be prompted for a comment for each file added to the
  560.           archive.  If the file being added has replaced, or is a
  561.           newer generation of, a file already in the archive, any
  562.           comment attached to that file is shown to the user and
  563.           becomes attached to the newly-added file unless the
  564.           user changes it.  Possible user responses are as
  565.           described for the -comment command.  Applied to the
  566.           archive list command l, the c modifier causes the list-
  567.           ing of any comments attached to archived files.
  568.  
  569.       .   In conjunction with / or // this modifier causes any
  570.           extracted pathname beginning with `/' to be interpreted
  571.           relative to the current directory, resulting in the
  572.           possible creation of a subtree rooted at the current
  573.           directory.  In conjunction with the command P the .
  574.           modifier causes the packed archive to be created in the
  575.           current directory.  This is intended to allow users
  576.           with limited disk space but multiple disk drives to
  577.           pack large archives.
  578.  
  579.      d    Most commands that act on an archive act only on files
  580.           that are not deleted.  The d modifier makes commands
  581.           act on both normal and deleted files.  If doubled as
  582.           dd, this modifier forces selection only of deleted
  583.           files.
  584.  
  585.      f    Applied to the a and u commands, the f modifier causes
  586.           fast archiving by adding files without compression.
  587.           Applied to l it causes a fast listing of files in a
  588.           multicolumn format.
  589.  
  590.      q    Be quiet.  Normally zoo lists the name of each file and
  591.           what action it is performing.  The q modifier
  592.           suppresses this.  When files are being extracted to
  593.           standard output, the q modifier suppresses the header
  594.           preceding each file.  When archive contents are being
  595.           listed, this modifier suppresses any header and
  596.           trailer.  When a fast columnized listing is being
  597.           obtained, this modifier causes all output to be com-
  598.           bined into a single set of filenames for all archives
  599.           being listed.
  600.  
  601.           When doubled as qq, this modifier suppresses WARNING
  602.           messages, and when tripled as qqq, ERROR messages are
  603.           suppressed too.  FATAL error messages are never
  604.           suppressed.
  605.  
  606.      Recovering data from damaged archives
  607.  
  608.      The @ modifier allows the user to specify the exact position
  609.      in an archive where zoo should extract a file from, allowing
  610.      damaged portions of an archive to be skipped.  This modifier
  611.      must be immediately followed by a decimal integer without
  612.      intervening spaces, and possibly by a comma and another
  613.      decimal integer, giving a command of the form l@m or l@m,n
  614.      (to list archive contents) or x@m or x@m,n (to extract files
  615.      from an archive).  Listing or extraction begin at position m
  616.      in the archive.  The value of m must be the position within
  617.      the archive of an undamaged directory entry.  This position
  618.      is usually obtained from fiz(1) version 2.0 or later.
  619.  
  620.      If damage to the archive has shortened or lengthened it, all
  621.      positions within the archive may be changed by some constant
  622.      amount.  To compensate for this, the value of n may be
  623.      specified.  This value is also usually obtained from fiz(1).
  624.      It should be the position in the archive of the file data
  625.      corresponding to the directory entry that has been specified
  626.      with m.  Thus if the command x@456,575 is given, it will
  627.      cause the first 456 bytes of the archive to be skipped and
  628.      extraction to begin at offset 456;  in addition, zoo will
  629.      attempt to extract the file data from position 575 in the
  630.      archive instead of the value that is found in the directory
  631.      entry read from the archive.  For example, here is some of
  632.      the output of fiz when it acts on a damaged zoo archive:
  633.  
  634.      ****************
  635.          2526: DIR  [changes] ==>   95
  636.          2587: DATA
  637.      ****************
  638.          3909: DIR  [copyrite] ==> 1478
  639.          3970: DATA
  640.          4769: DATA
  641.      ****************
  642.  
  643.      In such output, DIR indicates where fiz found a directory
  644.      entry in the archive, and DATA indicates where fiz found
  645.      file data in the archive.  Filenames located by fiz are
  646.      enclosed in square brackets, and the notation "==>   95"
  647.      indicates that the directory entry found by fiz at position
  648.      2526 has a file data pointer to position 95.  (This is
  649.      clearly wrong, since file data always occur in an archive
  650.      after their directory entry.)  In actuality, fiz found file
  651.      data at positions 2587, 3970, and 4769.  Since fiz found
  652.      only two directory entries, and each directory entry
  653.      corresponds to one file, one of the file data positions is
  654.      an artifact.
  655.  
  656.      In this case, commands to try giving to zoo might be
  657.      x@2526,2587 (extract beginning at position 2526, and get
  658.      file data from position 2587), x@3090,3970 (extract at 3090,
  659.      get data from 3970) and x@3909,4769 (extract at 3909, get
  660.      data from 4769).  Once a correctly-matched directory
  661.      entry/file data pair is found, zoo will in most cases syn-
  662.      chronize with and correctly extract all files subsequently
  663.      found in the archive.  Trial and error should allow all
  664.      undamaged files to be extracted.  Also note that self-
  665.      extracting archives created using sez (the Self-Extracting
  666.      Zoo utility for MS-DOS), which are normally executed on an
  667.      MS-DOS system for extraction, can be extracted on non-MSDOS
  668.      systems using zoo's damaged-archive recovery method using
  669.      the @ modifier.
  670.  
  671.      Wildcard handling
  672.  
  673.      Under the **IX family of operating systems, the shell nor-
  674.      mally expands wildcards to a list of matching files.  Wild-
  675.      cards that are meant to match files within an archive must
  676.      therefore be escaped or quoted.  When selecting files to be
  677.      added to an archive, wildcard conventions are as defined for
  678.      the shell.  When selecting files from within an archive,
  679.      wildcard handling is done by zoo as described below.
  680.  
  681.      Under MS-DOS and AmigaDOS, quoting of wildcards is not
  682.      needed.  All wildcard expansion of filenames is done by zoo,
  683.      and wildcards inside directory names are expanded only when
  684.      listing or extracting files but not when adding them.
  685.  
  686.      The wildcard syntax interpreted by zoo is limited to the
  687.      following characters.
  688.  
  689.      *    Matches any sequence of zero or more characters.
  690.  
  691.      ?    Matches any single character.
  692.  
  693.           Arbitrary combinations of * and ? are allowed.
  694.  
  695.      /    If a supplied pattern contains a slash anywhere in it,
  696.           then the slash separating any directory prefix from the
  697.           filename must be matched explicitly.  If a supplied
  698.           pattern contains no slashes, the match is selective
  699.           only on the filename.
  700.  
  701.      c-c  Two characters separated by a hyphen specify a charac-
  702.           ter range.  All filenames beginning with those charac-
  703.           ters will match.  The character range is meaningful
  704.           only by itself or preceded by a directory name.  It is
  705.           not specially interpreted if it is part of a filename.
  706.  
  707.      : and ;
  708.           These characters are used to separate a filename from a
  709.           generation number and are used when selecting specific
  710.           generations of archived files.  If no generation char-
  711.           acter is used, the filename specified matches only the
  712.           latest generation of the file.  If the generation char-
  713.           acter is specified, the filename and the generation are
  714.           matched independently by zoo's wildcard mechanism.  If
  715.           no generation is specified following the : or ; charac-
  716.           ter, all generations of that file will match.  As a
  717.           special case, a generation number of 0 matches only the
  718.           latest generation of a file, while ^0 matches all gen-
  719.           erations of a file except the latest one.  If no
  720.           filename is specified preceding the generation charac-
  721.           ter, all filenames will match.  As a corollary, the
  722.           generation character by itself matches all generations
  723.           of all files.
  724.  
  725.      MS-DOS users should note that zoo does not treat the dot as
  726.      a special character, and it does not ignore characters
  727.      following an asterisk.  Thus * matches all filenames; *.*
  728.      matches filenames containing a dot; *_* matches filenames
  729.      containing an underscore;  and *z matches all filenames that
  730.      end with the character z, whether or not they contain a dot.
  731.  
  732.      Usage hints
  733.  
  734.      The Novice command set in zoo is meant to provide an inter-
  735.      face with functionality and format that will be familiar to
  736.      users of other similar archive utilities.  In keeping with
  737.      this objective, the Novice commands do not maintain or use
  738.      any subdirectory information or allow the use of zoo's abil-
  739.      ity to maintain multiple generations of files.  For this
  740.      reason, users should switch to exclusively using the Expert
  741.      commands as soon as possible.
  742.  
  743.      Although the Expert command set is quite large, it should be
  744.      noted that in almost every case, all legal modifiers for a
  745.      command are fully orthogonal.  This means that the user can
  746.      select any combination of modifiers, and when they act
  747.      together, they will have the intuitively obvious effect.
  748.      Thus the user need only memorize what each modifier does,
  749.      and then can combine them as needed without much further
  750.      thought.
  751.  
  752.      For example, consider the a command which is used to add
  753.      files to an archive.  By itself, it simply adds the speci-
  754.      fied files.  To cause only already-archived files to be
  755.      updated if their disk copies have been modified, it is only
  756.      necessary to add the u modifier, making the command au.  To
  757.      cause only new files (i.e., files not already in the
  758.      archive) to be added, the n modifier is used to create the
  759.      command an.  To cause both already-archived files to be
  760.      updated and new files to be added, the u and n modifiers can
  761.      be used together, giving the command aun.  Since the order
  762.      of modifiers is not significant, the command could also be
  763.      anu.
  764.  
  765.      Further, the c modifier can be used to cause zoo to prompt
  766.      the user for a comment to attach to each file added.  And
  767.      the f modifier can cause fast addition (addition without
  768.      compression).  It should be obvious then that the command
  769.      auncf will cause zoo to update already-archived files, add
  770.      new files, prompt the user for comments, and do the addition
  771.      of files without any compression.  Furthermore, if the user
  772.      wishes to move files to the archive, i.e., delete the disk
  773.      copy of each file after it is added to the archive, it is
  774.      only necessary to add the M modifier to the command, so it
  775.      becomes auncfM.  And if the user also wishes to cause the
  776.      archive to be packed as part of the command, thus recovering
  777.      space from any files that are replaced, the command can be
  778.      modified to auncfMP by adding the P modifier that causes
  779.      packing.
  780.  
  781.      Similarly, the archive listing commands can be built up by
  782.      combining modifiers.  The basic command to list the contents
  783.      of an archive is l.  If the user wants a fast columnized
  784.      listing, the f modifier can be added to give the lf command.
  785.      Since this listing will have a header giving the archive
  786.      name and a trailer summarizing interesting information about
  787.      the archive, such as the number of deleted files, the user
  788.      may wish to "quieten" the listing by suppressing these;  the
  789.      relevant modifier is q, which when added to the command
  790.      gives lfq.  If the user wishes to see the **IX mode (file
  791.      protection) bits, and also information about multiple gen-
  792.      erations, the modifiers m (show mode bits) and g (show
  793.      generation information) can be added, giving the command
  794.      lfqmg.  If the user also wishes to see an attached archive
  795.      comment, the modifier A (for archive) will serve.  Thus the
  796.      command lfqmgA will give a fast columnized listing of the
  797.      archive, suppressing any header and trailer, showing mode
  798.      bits and generation information, and showing any comment
  799.      attached to the archive as a whole.  If in addition indivi-
  800.      dual comments attached to files are also needed, simply
  801.      append the c modifier to the command, making it lfqmgAc.
  802.      The above command will not show any deleted files, however;
  803.      to see them, use the d modifier, making the command lfqmgAcd
  804.      (or double it as in lfqmgAcdd if only the deleted files are
  805.      to be listed).  And if the user also wishes to see the CRC
  806.      value for each file being listed, the modifier C will do
  807.      this, as in the command lfqmgAcdC, which gives a fast colum-
  808.      nized listing of all files, including deleted files, showing
  809.      any archive comment and file comments, and file protection
  810.      codes and generation information, as well as the CRC value
  811.      of each file.
  812.  
  813.      Note that the above command lfqmgAcdC could also be abbrevi-
  814.      ated to VfqmgdC because the command V is shorthand for lcA
  815.      (archive listing with all comments shown).  Similarly the
  816.      command v is shorthand for lA (archive listing with archive
  817.      comment shown).  Both V and v can be used as modifiers to
  818.      any of the other archive listing commands.
  819.  
  820.      Generations
  821.  
  822.      By default, zoo assumes that only the latest generation of a
  823.      specified file is needed.  If generations other than the
  824.      latest one need to be selected, this may be done by specify-
  825.      ing them in the filename.  For example, the name stdio.h
  826.      would normally refer to the latest generation of the file
  827.      stdio.h stored in a zoo archive.  To get an archive listing
  828.      showing all generations of stdio.h in the archive, the
  829.      specification stdio.h:* could be used (enclosed in single
  830.      quotes if necessary to protect the wildcard character * from
  831.      the shell).  Also, stdio.h:0 selects only the latest genera-
  832.      tion of stdio.h, while stdio.h:^0 selects all generations
  833.      except the latest one.  The : character here separates the
  834.      filename from the generation number, and the character * is
  835.      a wildcard that matches all possible generations.  For con-
  836.      venience, the generation itself may be left out, so that the
  837.      name stdio.h: (with the : but without a generation number or
  838.      a wildcard) matches all generations exactly as stdio.h:*
  839.      does.
  840.  
  841.      If a generation is specified but no filename is present, as
  842.      in :5, :*, or just :, all filenames of the specified genera-
  843.      tion will be selected.  Thus :5 selects generation 5 of each
  844.      file, and :* and : select all generations of all files.
  845.  
  846.      It is important to note that zoo's idea of the latest gen-
  847.      eration of a file is not based upon searching the entire
  848.      archive.  Instead, whenever zoo adds a file to an archive,
  849.      it is marked as being the latest generation.  Thus, if the
  850.      latest generation of a file is deleted, then no generation
  851.      of that file is considered the latest any more.  This can be
  852.      surprising to the user.  For example, if an archive already
  853.      contains the file stdio.h:5 and a new copy is added, appear-
  854.      ing in the archive listing as stdio.h:6, and then stdio.h:6
  855.      is deleted, the remaining copy stdio.h:5 will no longer be
  856.      considered to be the latest generation, and the file
  857.      stdio.h:5, even if undeleted, will no longer appear in an
  858.      archive listing unless generation 5 (or every generation) is
  859.      specifically requested.  This behavior will likely be
  860.      improved in future releases of zoo.
  861.  
  862. FILES
  863.      xXXXXXX - temporary file used during packing
  864.      archive_name.bak - backup of archive
  865.  
  866. SEE ALSO
  867.      compress(1), fiz(1)
  868.  
  869. BUGS
  870.      When files are being added to an archive on a non-MS-DOS
  871.      system, it is possible for zoo to fail to detect a full disk
  872.      and hence create an invalid archive.  This bug will be fixed
  873.      in a future release.
  874.  
  875.      Files with generation counts that wrap around from 65535 to
  876.      1 are not currently handled correctly.  If a file's genera-
  877.      tion count reaches a value close to 65535, it should be
  878.      manually set back down to a low number.  This may be easily
  879.      done with a command such as gc-65000, which subtracts 65000
  880.      from the generation count of each specified file.  This
  881.      problem will be fixed in a future release.
  882.  
  883.      Although zoo on **IX systems preserves the lowest nine mode
  884.      bits of regular files, it does not currently do the same for
  885.      directories.
  886.  
  887.      Currently zoo's handling of the characters : and ; in
  888.      filenames is not robust, because it interprets these to
  889.      separate a filename from a generation number.  A quoting
  890.      mechanism will eventually be implemented.
  891.  
  892.      Standard input cannot be archived nor can a created archive
  893.      be sent to standard output.  Spurious error messages may
  894.      appear if the filename of an archive is too long.
  895.  
  896.      Since zoo never archives any file with the same name as the
  897.      archive or its backup (regardless of any path prefixes),
  898.      care should be taken to make sure that a file to be archived
  899.      does not coincidentally have the same name as the archive it
  900.      is being added to.  It usually suffices to make sure that no
  901.      file being archived is itself a zoo archive.  (Previous ver-
  902.      sions of zoo sometimes tried to add an archive to itself.
  903.      This bug now seems to be fixed.)
  904.  
  905.      Only regular files are archived; devices and empty direc-
  906.      tories are not.  Support for archiving empty directories and
  907.      for preserving directory attributes is planned for the near
  908.      future.
  909.  
  910.      Early versions of MS-DOS have a bug that prevents "." from
  911.      referring to the root directory;  this leads to anomalous
  912.      results if the extraction of paths beginning with a dot is
  913.      attempted.
  914.  
  915.      VAX/VMS destroys case information unless arguments are
  916.      enclosed in double quotes.  For this reason if a command
  917.      given to zoo on a VAX/VMS system includes any uppercase
  918.      characters, it must be enclosed in double quotes.  Under
  919.      VAX/VMS, zoo does not currently restore file timestamps;
  920.      this will be fixed as soon as I figure out RMS extended
  921.      attribute blocks, or DEC supplies a utime() function, which-
  922.      ever occurs first.  Other VMS bugs, related to file struc-
  923.      tures, can often be overcome by using the program bilf.c
  924.      that is supplied with zoo.
  925.  
  926.      It is not currently possible to create a zoo archive con-
  927.      taining all zoo archives that do not contain themselves.
  928.  
  929. DIAGNOSTICS
  930.      Error messages are intended to be self-explanatory and are
  931.      divided into three categories.  WARNINGS are intended to
  932.      inform the user of an unusual situation, such as a CRC error
  933.      during extraction, or -freshening of an archive containing a
  934.      file newer than one specified on the command line.  ERRORS
  935.      are fatal to one file, but execution continues with the next
  936.      file if any.  FATAL errors cause execution to be aborted.
  937.      The occurrence of any of these causes an exit status of 1.
  938.      Normal termination without any errors gives an exit status
  939.      of 0.  (Under VAX/VMS, however, to avoid an annoying mes-
  940.      sage, zoo always exits with an error code of 1.)
  941.  
  942. COMPATIBILITY
  943.      All versions of zoo on all systems are required to create
  944.      archives that can be extracted and listed with all versions
  945.      of zoo on all systems, regardless of filename and directory
  946.      syntax or archive structure;  furthermore, any version of
  947.      zoo must be able to fully manipulate all archives created by
  948.      all lower-numbered versions of zoo on all systems.  So far
  949.      as I can tell, this upward compatibility (all manipulations)
  950.      and downward compatiblity (ability to extract and list) is
  951.      maintained by zoo versions up to 2.01.  Version 2.1 adds the
  952.      incompatibility that if high-performance compression is
  953.      used, earlier versions cannot extract files compressed with
  954.      version 2.1.  This is the only incompatibility that is per-
  955.      missible.  You are forbidden, with the force of copyright
  956.      law, to create from the zoo source code any derivative work
  957.      that violates this compatibility goal, whether knowingly or
  958.      through negligence.  If any violation of this compatibility
  959.      goal is observed, this should be considered a serious prob-
  960.      lem and reported to me.
  961.  
  962. CHANGES
  963.      Here is a list of changes occurring from version 1.50 to
  964.      version 2.01.  In parentheses is given the version in which
  965.      each change occurred.
  966.  
  967.      -    (1.71) New modifiers to the list commands permit
  968.           optional suppression of header and trailer information,
  969.           inclusion of directory names in columnized listings,
  970.           and fast one-column listings.
  971.  
  972.      -    (1.71) Timezones are handled.
  973.  
  974.      -    (1.71) A bug was fixed that had made it impossible to
  975.           individually update comments for a file whose name did
  976.           not correspond to MS-DOS format.
  977.  
  978.      -    (1.71) A change was made that now permits use of the
  979.           shared library on the **IX PC.
  980.  
  981.      -    (1.71) VAX/VMS is now supported reasonably well.
  982.  
  983.      -    (2.00) A comment may now be attached to the archive
  984.           itself.
  985.  
  986.      -    (2.00) The OO option allows forced overwriting of
  987.           read-only files.
  988.  
  989.      -    (2.00) Zoo will no longer extract a file if a newer
  990.           copy already exists on disk;  the S option will
  991.           override this.
  992.  
  993.      -    (2.00) File attributes are preserved for **IX systems.
  994.  
  995.      -    (2.00) Multiple generations of the same file are sup-
  996.           ported.
  997.  
  998.      -    (2.00) Zoo will now act as a compression or decompres-
  999.           sion filter on a stream of data and will use a CRC
  1000.           value to check the integrity of a data stream that is
  1001.           uncompressed.
  1002.  
  1003.      -    (2.00) A bug was fixed that caused removal of a direc-
  1004.           tory link if files were moved to an archive by the
  1005.           superuser on a **IX system.
  1006.  
  1007.      -    (2.00) The data recovery modifier @ was greatly
  1008.           enhanced.  Self-extracting archives created for MS-DOS
  1009.           systems can now be extracted by zoo on any system with
  1010.           help from fiz(1).
  1011.  
  1012.      -    (2.01) A bug was fixed that had caused the first gen-
  1013.           eration of a file to sometimes unexpectedly show up in
  1014.           archive listings.
  1015.  
  1016.      -    (2.01) A bug was fixed that had caused the MS-DOS ver-
  1017.           sion to silently skip files that could not be extracted
  1018.           because of insufficient disk space.
  1019.  
  1020.      -    (2.01) A bug was fixed that had sometimes made it
  1021.           impossible to selectively extract a file by specifying
  1022.           its name, even though all files could be extracted from
  1023.           the archive by not specifying any filenames.  This
  1024.           occurred when a file had been archived on a longer-
  1025.           filename system (e.g. AmigaDOS) and extraction was
  1026.           attempted on a shorter-filename system (e.g. MS-DOS).
  1027.  
  1028.      -    (2.01) A change was made that will make zoo preserve
  1029.           the mode (file protection) of a zoo archive when it is
  1030.           packed.  This is effective only if zoo is compiled to
  1031.           preserve and restore file attributes.  Currently this
  1032.           is so only for **IX systems.
  1033.  
  1034.      -    (2.01) A bug was fixed that had caused an update of an
  1035.           archive to not always add all newer files.
  1036.  
  1037.      -    (2.01) Blanks around equal signs in commands given to
  1038.           "make" were removed from the mk* scripts for better
  1039.           compatiblity with more **IX implementations including
  1040.           Sun's.
  1041.  
  1042.      -    (2.1) Compression is now greatly improved if the "h"
  1043.           option is used.
  1044.  
  1045.      -    (2.1) The default behavior is to preserve full path-
  1046.           names during extraction.
  1047.  
  1048.      -    (2.1) On some systems, extraction of files using the
  1049.           older (default) compression method is greatly speeded
  1050.           up.
  1051.  
  1052.      -    (2.1) Extended multiscreen help is available.
  1053.  
  1054.      -    (2.1) Memory allocation is improved, so that the MS-DOS
  1055.           version will not prematurely abort when updating a
  1056.           large archive.
  1057.  
  1058.      -    (2.1) The VAX/VMS version preserves file timestamps
  1059.           during extraction.
  1060.  
  1061.      -    (2.1) The default archive-wide generation limit, when
  1062.           generations are enabled, is 3.
  1063.  
  1064. FUTURE DIRECTIONS
  1065.      A revised version of zoo is in the works that will be able
  1066.      to write newly-created archives to standard output and will
  1067.      support multivolume archives.  It will be upward and down-
  1068.      ward compatible with this version of zoo.
  1069.  
  1070. ACKNOWLEDGEMENTS
  1071.      The zoo archiver was initially developed using Microsoft C
  1072.      3.0 on a PC clone manufactured by Toshiba of Japan and
  1073.      almost sold by Xerox.  Availability of the following systems
  1074.      was helpful in achieving portability: Paul Homchick's Compaq
  1075.      running Microport System V/AT;  The Eskimo BBS somewhere in
  1076.      Oregon running Xenix/68000; Greg Laskin's system 'gryphon'
  1077.      which is an Intel 310 running Xenix/286;  Ball State
  1078.      University's AT&T 3B2/300, UNIX PC, and VAX-11/785 (4.3BSD
  1079.      and VAX/VMS) systems.  In addition J. Brian Waters provided
  1080.      feedback to help me make the code compilable on his Amiga
  1081.      using Manx/Aztec C.  The executable version 2.0 for MS-DOS
  1082.      is currently compiled with Borland's Turbo C++ 1.0.
  1083.  
  1084.      Thanks are due to the following people and many others too
  1085.      numerous to mention.
  1086.  
  1087.      J. Brian Waters <jbwaters@bsu-cs.bsu.edu>, who has worked
  1088.      diligently to port zoo to AmigaDOS, created Amiga-specific
  1089.      code, and continues keeping it updated.
  1090.  
  1091.      Paul Homchick <rutgers!cgh!paul>, who provided numerous
  1092.      detailed reports about some nasty bugs.
  1093.  
  1094.      Bill Davidsen <davidsen@crdos1.crd.ge.com>, who provided
  1095.      numerous improvements to this manual, contributed mul-
  1096.      tiscreen help, and provided many useful bug reports, bug
  1097.      fixes, code improvements, and suggestions.
  1098.  
  1099.      Mark Alexander <amdahl!drivax!alexande>, who provided me
  1100.      with some bug fixes.
  1101.  
  1102.      Haruhiko Okumura, who wrote the ar archiver and some excel-
  1103.      lent compression code, which I adapted for use in zoo.
  1104.  
  1105.      Randal L. Barnes <rlb@skyler.mavd.honeywell.com>, who (with
  1106.      Randy Magnuson) wrote the code to support the preservation
  1107.      of file timestamps under VAX/VMS.
  1108.  
  1109.      Raymond D. Gardner, who contributed replacement uncompres-
  1110.      sion code that on some systems is twice as fast as the ori-
  1111.      ginal.
  1112.  
  1113.      Greg Yachuk and Andre Van Dalen, who independently modified
  1114.      MS-DOS zoo to support multivolume archives.  (This support
  1115.      is not yet in this official release.)
  1116.  
  1117. AUTHOR
  1118.      Rahul Dhesi
  1119.