home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / ZOO20OS2.ZIP / ZOO.MAN < prev   
Text File  |  1990-03-01  |  49KB  |  1,056 lines

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