home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / ZOODOC.ZIP / ZOO.MAN < prev    next >
Text File  |  1987-07-12  |  21KB  |  569 lines

  1.  
  2.  
  3.  
  4. ZOO(1)              **IX Programmer's Manual               ZOO(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      zoo - manipulate archives of files in compressed form
  10.  
  11. SYNOPSIS
  12.      zoo {acDehlLPTuUvx}[cdEfInMNoOpPquv1:./@] archive [file] ...
  13.      zoo -command archive [file] ...
  14.      zoo h
  15.  
  16. DESCRIPTION
  17.      Zoo is used to create and maintain collections of files in
  18.      compressed form.  It uses a Lempel-Ziv compression algorithm
  19.      that gives space savings in the range of 20% to 80% depend-
  20.      ing on the type of file data.
  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, it marks as
  35.      deleted any already-archived file with the same name.
  36.      (Directory prefixes are significant in this comparison if
  37.      and only if directory names are being stored.) Deleted files
  38.      may be later undeleted.  Archives may be packed to recover
  39.      space occupied by deleted files.
  40.  
  41.      All commands assume that the archive name ends with the
  42.      characters .zoo unless a different extension is supplied.
  43.  
  44.      Novice commands
  45.  
  46.      Novice commands may be abbreviated to a hyphen followed by
  47.      at least one command character.  Each Novice command works
  48.      in two stages. First, the command does its intended work.
  49.      Then, if the result was that one or more files were deleted
  50.      in the specified archive, the archive is packed.  If packing
  51.      occurs, the original unpacked archive is always left behind
  52.      with an extension of .bak.
  53.  
  54.      No Novice command ever stores the directory prefix of a
  55.      file.  When a Novice command is used to add a file to an
  56.      archive, any already-archived file with the same name,
  57.      regardless of the directory prefix, is marked deleted.
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Printed 7/12/87           Jul 12, 1987                          1
  64.  
  65.  
  66.  
  67. ZOO(1)              **IX Programmer's Manual               ZOO(1)
  68.  
  69.  
  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 65,535 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. Printed 7/12/87           Jul 12, 1987                          2
  127.  
  128.  
  129.  
  130. ZOO(1)              **IX Programmer's Manual               ZOO(1)
  131.  
  132.  
  133.  
  134.      The correspondence between Novice and Expert commands is as follows.
  135.  
  136.    Novice                                                   Equivalent
  137.    Command    Description                                   Expert Command
  138.    _______________________________________________________________________
  139.    -add       add files to archive                          aP:
  140.    -extract   extract files from archive                    x
  141.    -move      move files to archive                         aMP:
  142.    -test      test archive integrity                        xNd
  143.    -print     extract files and send to standard output     xp
  144.    -delete    delete files from archive                     DP
  145.    -list      list information about archived files         v
  146.    -update    update archive by adding new or newer files   aunP:
  147.    -freshen   freshen archive by adding newer files         auP:
  148.    -comment   allows user to attach comments to files       c
  149.  
  150.      Expert commands
  151.  
  152.      The general format of expert commands is:
  153.  
  154.      zoo {acDehlPTuUvx}[cdEfInMNoOpPquv1:./@] 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}[cfIMnPqu:] archive [file] ...
  165.  
  166.      Command characters are:
  167.  
  168.      a    Add each specified file to archive.  Any already-
  169.           archived file with the same name is marked as deleted.
  170.  
  171.      u    Do an update of the archive.  A specified file is added
  172.           to the archive only if a copy of it is already in the
  173.           archive and the copy being added is newer than the copy
  174.           already in the archive.
  175.  
  176.      The following modifiers are specific to these commands.
  177.  
  178.      M    Move files to archive.  This makes zoo delete (unlink)
  179.           the original files after they have been added to the
  180.           archive.  Files are deleted after addition of all files
  181.           to the archive is complete and after any requested
  182.           packing of the archive has been done, and only if zoo
  183.           detected no errors.
  184.  
  185.  
  186.  
  187.  
  188.  
  189. Printed 7/12/87           Jul 12, 1987                          3
  190.  
  191.  
  192.  
  193. ZOO(1)              **IX Programmer's Manual               ZOO(1)
  194.  
  195.  
  196.  
  197.      n    Add new files only.  A specified file is added only if
  198.           it isn't already in the archive.
  199.  
  200.      P    Pack archive after files have been added.
  201.  
  202.      u    Applied to the a command, this modifier makes it behave
  203.           identically to the u command.
  204.  
  205.           The combination of the n modifier with the u modifier
  206.           or u command causes addition of a file to the archive
  207.           either if the file is not already in the archive, or if
  208.           the file is already in the archive but the archived
  209.           copy is older than the copy being added.
  210.  
  211.      :    Do not store directory names.  In the absence of this
  212.           modifier zoo stores the full pathname of each archived
  213.           file.
  214.  
  215.      I    Read filenames to be archived from standard input. Zoo
  216.           will read its standard input and assume that each line
  217.           of text contains a filename.  Under the **IX family,
  218.           the entire line is used.  Under MS-DOS and AmigaDOS,
  219.           zoo assumes that the filename is terminated by a blank,
  220.           tab, or newline; thus it is permissible for the line of
  221.           text to contain more than one field separated by white
  222.           space, and only the first field will 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.      Files are extracted from an archive with the command:
  235.  
  236.      zoo {ex}[dNoOpq./@] archive [file] ...
  237.  
  238.      The e and x commands are synonymous.  If no file was speci-
  239.      fied, all files are extracted from the archive.
  240.  
  241.      The following modifiers are specific to the e and x com-
  242.      mands:
  243.  
  244.      N    Do not save extracted data but report any errors
  245.           encountered.
  246.  
  247.      O    Overwrite files.  Normally, if a file being extracted
  248.           would overwrite an already-existing file of the same
  249.  
  250.  
  251.  
  252. Printed 7/12/87           Jul 12, 1987                          4
  253.  
  254.  
  255.  
  256. ZOO(1)              **IX Programmer's Manual               ZOO(1)
  257.  
  258.  
  259.  
  260.           name, zoo asks you if you really want to overwrite it.
  261.           You may answer the question with `y', which means yes,
  262.           overwrite; or `n', which means no, don't overwrite; or
  263.           `a', which means assume the answer is `y' for this and
  264.           all subsequent files.  The O modifier makes zoo assume
  265.           that files may always be overwritten.
  266.  
  267.           The O, N, and p modifiers are mutually exclusive.
  268.  
  269.      o    This is equivalent to the O modifier if and only if it
  270.           is given at least twice.  It is otherwise ignored.
  271.  
  272.      p    Pipe extracted data to standard output.  Error messages
  273.           are piped to standard output as well.  However, if a
  274.           bad CRC is detected, an error message is sent both to
  275.           standard error and to standard output.
  276.  
  277.      /    Extract to original pathname.  Any needed directories
  278.           must already exist.  In the absence of this modifier
  279.           all files are extracted into the current directory.  If
  280.           this modifier is doubled as //, needed directories need
  281.           not exist and are created if necessary.
  282.  
  283.      Archived files are listed with the command:
  284.  
  285.      zoo {lLv}[adfv@] archive[.zoo] [file] ...
  286.  
  287.      l    Information presented includes the date and time of
  288.           each file, its original and current (compressed) sizes,
  289.           and the percentage size decrease due to compression
  290.           (labelled CF or compression factor).  If no filename is
  291.           supplied all files are listed except deleted files.
  292.  
  293.      L    This is identical to the l command except that all sup-
  294.           plied arguments must be archives and the contents of
  295.           each are listed.
  296.  
  297.      v    This causes a verbose listing, which additionally shows
  298.           any comment attached to each file.  Using the v modif-
  299.           ier with the l command has the same effect.
  300.  
  301.      The following modifier is specific to the archive list com-
  302.      mands:
  303.  
  304.      a    This gives a single-line format containing both each
  305.           filename and the name of the archive, sorted by archive
  306.           name.  It is especially useful with the L command,
  307.           since the result can be further sorted on any field to
  308.           give a master listing of the entire contents of a set
  309.           of archives.
  310.  
  311.  
  312.  
  313.  
  314.  
  315. Printed 7/12/87           Jul 12, 1987                          5
  316.  
  317.  
  318.  
  319. ZOO(1)              **IX Programmer's Manual               ZOO(1)
  320.  
  321.  
  322.  
  323.      Files may be deleted and undeleted from an archive with the
  324.      following commands:
  325.  
  326.      zoo {DU}[Pq1] archive file ...
  327.  
  328.      The D command deletes the specified files and the U command
  329.      undeletes the specified files.  The 1 modifier (the digit
  330.      one, not the letter ell) forces deletion or undeletion of at
  331.      most one file.  If multiple instances of the same file exist
  332.      in an archive, use of the 1 modifier may allow selective
  333.      extraction of one of these.
  334.  
  335.      Comments may be added to an archive with the command:
  336.  
  337.      zoo c archive
  338.  
  339.      This behaves identically to the -comment command.
  340.  
  341.      The timestamp of an archive may be adjusted with the com-
  342.      mand:
  343.  
  344.      zoo T[q] archive
  345.  
  346.      Zoo normally attempts to maintain the timestamp of an
  347.      archive to reflect the age of the newest file stored in it.
  348.      Should the timestamp ever be incorrect it can be fixed with
  349.      the T command.
  350.  
  351.      An archive may be packed with the command:
  352.  
  353.      zoo P[EPq] archive
  354.  
  355.      If the backup copy of the archive already exists, zoo will
  356.      refuse to pack the archive unless the P modifier is also
  357.      given.  The E modifier causes zoo not to save a backup copy
  358.      of the original archive after packing.  A unique temporary
  359.      file in the current directory is used to initially hold the
  360.      packed archive.  This file will be left behind if packing is
  361.      interrupted or if for some reason this file cannot be
  362.      renamed to the name of the original archive when packing is
  363.      complete.
  364.  
  365.      Packing removes any garbage data appended to an archive
  366.      because of Xmodem file transfer and also recovers space used
  367.      by comments that were replaced.
  368.  
  369.      General modifiers
  370.  
  371.      The following modifiers are applicable to several commands:
  372.  
  373.      c    Applied to the a and u commands, this causes the user
  374.           to be prompted for a comment for each file added to the
  375.  
  376.  
  377.  
  378. Printed 7/12/87           Jul 12, 1987                          6
  379.  
  380.  
  381.  
  382. ZOO(1)              **IX Programmer's Manual               ZOO(1)
  383.  
  384.  
  385.  
  386.           archive.  If the file being added has replaced a file
  387.           already in the archive, any comment attached to the
  388.           replaced file is shown to the user and becomes attached
  389.           to the newly-added file unless the user changes it.
  390.           Possible user responses are as described for the -com-
  391.           ment command.  Applied to the archive list command l,
  392.           the c modifier causes the listing of any comments
  393.           attached to archived files.
  394.  
  395.      .    In conjunction with / or // this modifier causes any
  396.           extracted pathname beginning with `/' to be interpreted
  397.           relative to the current directory, resulting in the
  398.           possible creation of a subtree rooted at the current
  399.           directory.  In conjunction with the command P the .
  400.           modifier causes the packed archive to be created in the
  401.           current directory.  This is intended to allow users
  402.           with limited disk space but multiple disk drives to
  403.           pack large archives.
  404.  
  405.      d    Most commands that act on an archive act only on files
  406.           that are not deleted.  The d modifier makes commands
  407.           act on both normal and deleted files.  If doubled as
  408.           dd, this modifier forces selection only of deleted
  409.           files.
  410.  
  411.      f    Applied to the a and u commands, the f modifier causes
  412.           fast archiving by adding files without compression.
  413.           Applied to l it causes a fast listing of files in a
  414.           multicolumn format.
  415.  
  416.      q    Be quiet.  Normally zoo lists the name of each file and
  417.           what action it is performing.  The q modifier
  418.           suppresses this.  When files are being extracted to
  419.           standard output, the q modifier suppresses the header
  420.           preceding each file.
  421.  
  422.           Error messages are never suppressed.
  423.  
  424.      @    Extract or list beginning at position n, where n is a
  425.           decimal number following the @ sign without any inter-
  426.           vening spaces.  This may be used to recover data from a
  427.           damaged archive by skipping the damaged part.  The
  428.           number specified must be the position within the
  429.           archive of an undamaged directory entry.  This position
  430.           is usually obtained from fiz(1).
  431.  
  432.      Wildcard handling
  433.  
  434.      Under the **IX family of operating systems, the shell nor-
  435.      mally expands wildcards to a list of matching files.  Wild-
  436.      cards that are meant to match files within an archive must
  437.      therefore be escaped or quoted.  When selecting files to be
  438.  
  439.  
  440.  
  441. Printed 7/12/87           Jul 12, 1987                          7
  442.  
  443.  
  444.  
  445. ZOO(1)              **IX Programmer's Manual               ZOO(1)
  446.  
  447.  
  448.  
  449.      added to an archive, wildcard conventions are as defined for
  450.      the shell.  When selecting files from within an archive,
  451.      wildcard handling is done by zoo as described below.
  452.  
  453.      Under MS-DOS and AmigaDOS, quoting of wildcards is not
  454.      needed.  All wildcard expansion of filenames is done by zoo,
  455.      and wildcards inside directory names are expanded only when
  456.      listing or extracting files but not when adding them.
  457.  
  458.      The wildcard syntax interpreted by zoo is limited to the
  459.      following characters.
  460.  
  461.      *    Matches any sequence of zero or more characters.
  462.  
  463.      ?    Matches any single character.
  464.  
  465.           Arbitrary combinations of * and ? are allowed.
  466.  
  467.      /    If a supplied pattern contains a slash anywhere in it,
  468.           then the slash separating any directory prefix from the
  469.           filename must be matched explicitly.  If a supplied
  470.           pattern contains no slashes, the match is selective
  471.           only on the filename.
  472.  
  473.      c-c  Two characters separated by a hyphen specify a charac-
  474.           ter range.  All filenames beginning with those charac-
  475.           ters will match.  The character range is meaningful
  476.           only by itself or preceded by a directory name.  It is
  477.           not specially interpreted if it is part of a filename.
  478.  
  479.      MS-DOS users should note that zoo does not treat the dot as
  480.      a special character, and it does not ignore characters fol-
  481.      lowing an asterisk.  Thus * matches all filenames; *.*
  482.      matches filenames containing a dot; *_* matches filenames
  483.      containing an underscore;  and *z matches all filenames that
  484.      end with the character z, whether or not they contain a dot.
  485.  
  486. FILES
  487.      xXXXXXX - temporary file used during packing
  488.      archive_name.bak - backup of archive
  489.  
  490. SEE ALSO
  491.      compress(1), fiz(1)
  492.  
  493. BUGS
  494.      Standard input cannot be archived nor can a created archive
  495.      be sent to standard output.  Spurious error messages may
  496.      appear if the filename of an archive is too long.
  497.  
  498.      Since zoo never archives any file with the same name as the
  499.      archive or its backup (regardless of any path prefixes),
  500.      care should be taken to make sure that a file to be archived
  501.  
  502.  
  503.  
  504. Printed 7/12/87           Jul 12, 1987                          8
  505.  
  506.  
  507.  
  508. ZOO(1)              **IX Programmer's Manual               ZOO(1)
  509.  
  510.  
  511.  
  512.      does not coincidentally have the same name as the archive it
  513.      is being added to. It usually suffices to make sure that no
  514.      file being archived is itself a zoo archive.
  515.  
  516.      Only regular files are archived; directories and devices are
  517.      not.
  518.  
  519.      Early versions of MS-DOS have a bug that prevents "." from
  520.      referring to the root directory;  this leads to anomalous
  521.      results if the extraction of paths beginning with a dot is
  522.      attempted.
  523.  
  524.      It is not currently possible to create a zoo archive con-
  525.      taining all zoo archives that do not contain themselves.
  526.  
  527. DIAGNOSTICS
  528.      Error messages are intended to be self-explanatory and are
  529.      divided into three categories.  WARNINGS are intended to
  530.      inform the user of an unusual situation, such as a CRC error
  531.      during extraction, or -freshening of an archive containing a
  532.      file newer than one specified on the command line.  ERRORS
  533.      are fatal to one file, but execution continues with the next
  534.      file if any.  FATAL errors cause execution to be aborted.
  535.      The occurrence of any of these causes an exit status of 1.
  536.      Normal termination without any errors gives an exit status
  537.      of 0.
  538.  
  539. FUTURE DIRECTIONS
  540.      A revised version of zoo is in the works which will allow
  541.      numbering of multiple versions of a file and automatically
  542.      perform end-of-line conversion for text files moved between
  543.      dissimilar systems.  It will be upward and downward compati-
  544.      ble with existing versions of zoo.
  545.  
  546. THANKS
  547.      Thanks are due to:
  548.  
  549.      Paul Homchick, who provided numerous detailed reports about
  550.      some nasty bugs.
  551.  
  552.      Bill Davidsen, who fixed zoo's handling of daylight savings
  553.      time and also provided changes to make this manual format
  554.      correctly with troff.
  555.  
  556. AUTHOR
  557.      Rahul Dhesi
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567. Printed 7/12/87           Jul 12, 1987                          9
  568.  
  569.