home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-07-11 | 50.8 KB | 1,129 lines |
- Newsgroups: alt.sources
- Subject: zoo 2.1 source part 12/15
- Message-ID: <12779@bsu-cs.bsu.edu>
- From: dhesi@bsu-cs.bsu.edu (Rahul Dhesi)
- Date: 10 Jul 91 11:20:09 GMT
-
- Checksum: 2763753897 (verify with "brik -cv")
- Submitted-by: dhesi@bsu-cs.bsu.edu
- Archive-name: zoo210/part12
-
- ---- Cut Here and feed the following to sh ----
- #!/bin/sh
- # This is part 12 of zoo210
- # ============= zoo.man ==============
- if test -f 'zoo.man' -a X"$1" != X"-c"; then
- echo 'x - skipping zoo.man (File already exists)'
- else
- echo 'x - extracting zoo.man (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'zoo.man' &&
- X
- ZOO(1) REFERENCE MANUAL ZOO(1)
- X
- NAME
- X zoo - manipulate archives of files in compressed form
- X
- SYNOPSIS
- X zoo {acfDeghHlLPTuUvVx}[aAcCdEfghImMnNoOpPqSu1:/.@n+-=]
- X archive [file] ...
- X zoo -command archive [file] ...
- X zoo h
- X
- DESCRIPTION
- X Zoo is used to create and maintain collections of files in
- X compressed form. It uses a Lempel-Ziv compression algorithm
- X that gives space savings in the range of 20% to 80% depend-
- X ing on the type of file data. Zoo can store and selectively
- X extract multiple generations of the same file. Data can be
- X recovered from damaged archives by skipping the damaged por-
- X tion and locating undamaged data with the help of fiz(1).
- X
- X This documentation is for version 2.1. Changes from previ-
- X ous versions are described in the section labelled CHANGES.
- X
- X The command zoo h gives a summary of commands. Extended
- X multiscreen help can be obtained with zoo H.
- X
- X Zoo will not add an archive to itself, nor add the archive's
- X backup (with .bak extension to the filename) to the archive.
- X
- X Zoo has two types of commands: Expert commands, which con-
- X sist of one command letter followed by zero or more modifier
- X characters, and Novice commands, which consist of a hyphen
- X (`-') followed by a command word that may be abbreviated.
- X Expert commands are case-sensitive but Novice commands are
- X not.
- X
- X When zoo adds a file to an existing archive, the default
- X action is to maintain one generation of each file in an
- X archive and to mark any older generation as deleted. A
- X limit on the number of generations to save can be specified
- X by the user for an entire archive, or for each file indivi-
- X dually, or both. Zoo deletes a stored copy of an added file
- X if necessary to prevent the number of stored generations
- X from exceeding the user-specified limit.
- X
- X Deleted files may be later undeleted. Archives may be
- X packed to recover space occupied by deleted files.
- X
- X All commands assume that the archive name ends with the
- X characters .zoo unless a different extension is supplied.
- X
- X Novice commands
- X
- X Novice commands may be abbreviated to a hyphen followed by
- X at least one command character. Each Novice command works
- X in two stages. First, the command does its intended work.
- X Then, if the result was that one or more files were deleted
- X in the specified archive, the archive is packed. If packing
- X occurs, the original unpacked archive is always left behind
- X with an extension of .bak.
- X
- X No Novice command ever stores the directory prefix of a
- X file.
- X
- X The Novice commands are as follows.
- X
- X -add Adds the specified files to the archive.
- X
- X -freshen
- X Adds a specified file to the archive if and only if an
- X older file by the same name already exists in the
- X archive.
- X
- X -delete
- X Deletes the specified files from the archive.
- X
- X -update
- X Adds a specified file to the archive either: if an
- X older file by the same name already exists in the
- X archive or: if a file by the same name does not
- X already exist in the archive.
- X
- X -extract
- X Extracts the specified files from the archive. If no
- X file is specified all files are extracted.
- X
- X -move
- X Equivalent to -add except that source files are deleted
- X after addition.
- X
- X -print
- X Equivalent to -extract except that extracted data are
- X sent to standard output.
- X
- X -list
- X Gives information about the specified archived files
- X including any attached comments. If no files are
- X specified all files are listed. Deleted files are not
- X listed.
- X
- X -test
- X Equivalent to -extract except that the extracted data
- X are not saved but any errors encountered are reported.
- X
- X -comment
- X Allows the user to add or update comments attached to
- X archived files. When prompted, the user may: type a
- X carriage return to skip the file, leaving any current
- X comment unchanged; or type a (possibly null) comment
- X of up to 32,767 characters terminated by /end (case-
- X insensitive) on a separate line; or type the end-of-
- X file character (normally control D) to skip all remain-
- X ing files.
- X
- X -delete
- X Deletes the specified files.
- X
- X The correspondence between Novice and Expert commands is as follows.
- X
- X Novice Equivalent
- X Command Description Expert Command
- X ____________________________________________________________
- X -add add files to archive aP:
- X -extract extract files from archive x
- X -move move files to archive aMP:
- X -test test archive integrity xNd
- X -print extract files to standard output xp
- X -delete delete files from archive DP
- X -list list archive contents VC
- X -update add new or newer files aunP:
- X -freshen by add newer files auP:
- X -comment add comments to files c
- X
- X Expert commands
- X
- X The general format of expert commands is:
- X
- X zoo {acfDeghHlLPTuUvVx}[aAcCdEfghImMnNoOpPqSu1:/.@n+-=]
- X archive [file] ...
- X
- X The characters enclosed within {} are commands. Choose any
- X one of these. The characters enclosed within [] just to the
- X right of the {} are modifiers and zero or more of these may
- X immediately follow the command character. All combinations
- X of command and modifier characters may not be valid.
- X
- X Files are added to an archive with the command:
- X
- X zoo {au}[cfhIMnPqu:+-] archive [file] ...
- X
- X Command characters are:
- X
- X a Add each specified file to archive. Any already-
- X archived copy of the file is deleted if this is neces-
- X sary to avoid exceeding the user-specified limit on the
- X number of generations of the file to maintain in the
- X archive.
- X
- X u Do an update of the archive. A specified file is added
- X to the archive only if a copy of it is already in the
- X archive and the copy being added is newer than the copy
- X already in the archive.
- X
- X The following modifiers are specific to these commands.
- X
- X M Move files to archive. This makes zoo delete (unlink)
- X the original files after they have been added to the
- X archive. Files are deleted after addition of all files
- X to the archive is complete and after any requested
- X packing of the archive has been done, and only if zoo
- X detected no errors.
- X
- X n Add new files only. A specified file is added only if
- X it isn't already in the archive.
- X
- X h Use the high performance compression algorithm. This
- X option may be used with either the add (a) or filter
- X (f) commands to gain extra compression at the expense
- X of using somewhat more processor time. Extracting files
- X compressed with the method is usually slightly faster
- X than those saved with the default method.
- X
- X P Pack archive after files have been added.
- X
- X u Applied to the a command, this modifier makes it behave
- X identically to the u command.
- X
- X The combination of the n modifier with the u modifier
- X or u command causes addition of a file to the archive
- X either if the file is not already in the archive, or if
- X the file is already in the archive but the archived
- X copy is older than the copy being added.
- X
- X : Do not store directory names. In the absence of this
- X modifier zoo stores the full pathname of each archived
- X file.
- X
- X I Read filenames to be archived from standard input. Zoo
- X will read its standard input and assume that each line
- X of text contains a filename. Under AmigaDOS and the
- X **IX family, the entire line is used. Under MS-DOS and
- X VAX/VMS, zoo assumes that the filename is terminated by
- X a blank, tab, or newline; thus it is permissible for
- X the line of text to contain more than one field
- X separated by white space, and only the first field will
- X be used.
- X
- X Under the **IX family of operating systems, zoo can be
- X used as follows in a pipeline:
- X
- X find . -print | zoo aI sources
- X
- X If the I modifier is specified, no filenames may be
- X supplied on the command line itself.
- X
- X +,- These modifiers take effect only if the a command
- X results in the creation of a new archive. + causes any
- X newly-created archive to have generations enabled. -
- X is provided for symmetry and causes any newly-created
- X archive to have generations disabled; this is also the
- X default if neither + nor - is specified.
- X
- X Files are extracted from an archive with the command:
- X
- X zoo {ex}[dNoOpqS./@] archive [file] ...
- X
- X The e and x commands are synonymous. If no file was speci-
- X fied, all files are extracted from the archive.
- X
- X The following modifiers are specific to the e and x com-
- X mands:
- X
- X N Do not save extracted data but report any errors
- X encountered.
- X
- X O Overwrite files. Normally, if a file being extracted
- X would overwrite an already-existing file of the same
- X name, zoo asks you if you really want to overwrite it.
- X You may answer the question with `y', which means yes,
- X overwrite; or `n', which means no, don't overwrite; or
- X `a', which means assume the answer is `y' for this and
- X all subsequent files. The O modifier makes zoo assume
- X that files may always be overwritten. Neither answer-
- X ing the question affirmatively nor using O alone will
- X cause read-only files to be overwritten.
- X
- X On **IX systems, however, doubling this modifier as OO
- X will force zoo to unconditionally overwrite any read-
- X protected files with extracted files if it can do so.
- X
- X The O, N, and p modifiers are mutually exclusive.
- X
- X S Supersede newer files on disk with older extracted
- X files. Unless this modifier is used, zoo will not
- X overwrite a newer existing file with an older extracted
- X file.
- X
- X o This is equivalent to the O modifier if and only if it
- X is given at least twice. It is otherwise ignored.
- X
- X p Pipe extracted data to standard output. Error messages
- X are piped to standard output as well. However, if a
- X bad CRC is detected, an error message is sent both to
- X standard error and to standard output.
- X
- X / Extract to original pathname. Any needed directories
- X must already exist. In the absence of this modifier
- X all files are extracted into the current directory. If
- X this modifier is doubled as //, required directories
- X need not exist and are created if necessary.
- X
- X The management of multiple generations of archived files is
- X done with the commands:
- X
- X zoo gl[Aq]{+-=}number archive files ..
- X zoo gc[q]{+-=}number archive files ..
- X zoo gA[q]- archive
- X zoo gA[q]+ archive
- X
- X The first form, gl, adjusts the generation limit of selected
- X files by the specified value. If the form =n is used, where
- X n is a decimal number, this sets the generation limit to the
- X specified value. If + or - are used in placed of = the
- X effect is to increment or decrement the generation limit by
- X the specified value. For example, the command
- X
- X zoo gl=5 xyz :
- X
- X
- X sets the generation limit of each file in the archive
- X xyz.zoo to a value of 5. The command
- X
- X zoo gl-3 xyz :
- X
- X
- X decrements the generation limit of each file in the archive
- X to 3 less than it currently is.
- X
- X If the A modifier is used, the archive-wide generation limit
- X is adjusted instead.
- X
- X The number of generations of a file maintained in an archive
- X is limited by the file generation limit, or the archive gen-
- X eration limit, whichever is lower. As a special case, a
- X generation limit of 0 stands for no limit. Thus the default
- X file generation limit of 0 and archive generation limit of 3
- X limits the number of generations of each file in a newly-
- X created archive to three.
- X
- X The generation limit specified should be in the range 0
- X through 15; any higher numbers are interpreted modulo 16.
- X
- X The second form of the command, using gc, adjusts the gen-
- X eration count of selected files. Each file has a generation
- X count of 1 when it is first added to an archive. Each time
- X a file by the same name is added again to an archive, it
- X receives a generation count that is one higher than the
- X highest generation count of the archived copy of the file.
- X The permissible range of generation counts is 1 through
- X 65535. If repeated manipulations of an archive result in
- X files having very high generation counts, they may be set
- X back to lower numbers with the gc command. The syntax of
- X the command is analogous to the syntax of the gl command,
- X except that the A modifier is not applicable to the gc com-
- X mand.
- X
- X The third form, gA-, disables generations in an archive.
- X Generations are off when an archive is first created, but
- X may be enabled with the fourth form of the command, gA+.
- X When generations are disabled in an archive, zoo will not
- X display generation numbers in archive listings or maintain
- X multiple generations. Generations can be re-enabled at any
- X time, though manipulation of an archive with repeated inter-
- X spersed gA- and gA+ commands may result in an archive whose
- X behavior is not easily understandable.
- X
- X Archived files are listed with the command:
- X
- X zoo {lLvV}[aAcCdfgmqvV@/1+-] archive[.zoo] [file] ...
- X
- X l Information presented includes the date and time of
- X each file, its original and current (compressed) sizes,
- X and the percentage size decrease due to compression
- X (labelled CF or compression factor). If a file was
- X added to the archive in a different timezone, the
- X difference between timezones is shown in hours as a
- X signed number. As an example, if the difference is
- X listed as +3, this means that the file was added to the
- X archive in a timezone that is 3 hours west of the
- X current timezone. The file time listed is, however,
- X always the original timestamp of the archived file, as
- X observed by the user who archived the file, expressed
- X as that user's local time. (Timezone information is
- X stored and displayed only if the underlying operating
- X system knows about timezones.)
- X
- X If no filename is supplied all files are listed except
- X deleted files.
- X
- X Zoo selects which generation(s) of a file to list
- X according to the following algorithm.
- X
- X If no filename is supplied, only the latest generation
- X of each file is listed. If any filenames are
- X specified, and a generation is specified for an argu-
- X ment, only the requested generation is listed. If a
- X filename is specified ending with the generation char-
- X acter (`:' or `;'), all generations of that file are
- X listed. Thus a filename argument of the form zoo.c
- X will cause only the latest generation of zoo.c to be
- X listed; an argument of the form zoo.c:4 will cause
- X generation 4 of zoo.c to be listed; and an argument of
- X the form zoo.c: or zoo.c:* will cause all generations
- X of zoo.c to be listed.
- X
- X L This is similar to the l command except that all sup-
- X plied arguments must be archives and all non-deleted
- X generations of all files in each archive appear in the
- X listing.
- X
- X On **IX systems, on which the shell expands arguments,
- X if multiple archives are to be listed, the L command
- X must be used. On other systems (VAX/VMS, AmigaDOS,
- X MSDOS) on which wildcard expansion is done internally
- X by zoo, wildcards may be used in the archive name, and
- X a multiple archive listing obtained, using the l com-
- X mand.
- X
- X v This causes any comment attached to the archive to be
- X listed in addition to the other information.
- X
- X V This causes any comment attached to the archive and
- X also any comment attached to each file to be listed.
- X
- X Both the V and v command characters can also be used as
- X modifiers to the l and L commands.
- X
- X In addition to the general modifiers described later, the
- X following modifiers can be applied to the archive list com-
- X mands.
- X
- X a This gives a single-line format containing both each
- X filename and the name of the archive, sorted by archive
- X name. It is especially useful with the L command,
- X since the result can be further sorted on any field to
- X give a master listing of the entire contents of a set
- X of archives.
- X
- X A This causes any comment attached to the archive to be
- X listed.
- X
- X g This modifier causes file generation information to be
- X listed about the archive. For each file listed, the
- X user-specified generation limit, if any, is listed.
- X For example, `3g' for a file means that the user wants
- X no more than three generations of the file to be kept.
- X In archives created by older versions of zoo, the list-
- X ing will show `-g', meaning that no generation informa-
- X tion is kept and multiple generations of the file are
- X not being maintained.
- X
- X In addition to the generation information for each
- X file, the archive-wide generation limit, if any, is
- X shown at the end of the listing. If generations have
- X been disabled by the user, this is so indicated, for
- X example:
- X
- X Archive generation limit is 3 (generations off).
- X
- X For more information about generations see the descrip-
- X tion of the g command.
- X
- X m This modifier is currently applicable to **IX systems
- X only. It causes the mode bits (file protection code)
- X of each file to be listed as a three-digit octal
- X number. Currently zoo preserves only the lowest nine
- X mode bits. Their meanings are as described in the **IX
- X documentation for the chmod(1) command.
- X
- X C This modifier causes the stored cyclic redundancy code
- X (CRC) for each archived file to be shown as a four-
- X digit hexadecimal number.
- X
- X 1 This forces one filename to be listed per line. It is
- X most useful in combination with the f modifier.
- X
- X / This forces any directory name to be always listed,
- X even in fast columnized listings that do not normally
- X include any directory names.
- X
- X +,- The - modifier causes trailing generation numbers to be
- X omitted from filenames. The + modifier causes the
- X trailing generation numbers to be shown, which is also
- X the default if neither - nor + is specified.
- X
- X Files may be deleted and undeleted from an archive with the
- X following commands:
- X
- X zoo {DU}[Pq1] archive file ...
- X
- X The D command deletes the specified files and the U command
- X undeletes the specified files. The 1 modifier (the digit
- X one, not the letter ell) forces deletion or undeletion of at
- X most one file. If multiple instances of the same file exist
- X in an archive, use of the 1 modifier may allow selective
- X extraction of one of these.
- X
- X Comments may be added to an archive with the command:
- X
- X zoo c[A] archive
- X
- X Without the modifier A, this behaves identically to the
- X -comment command. With the modifier A, the command serves
- X to add or update the comment attached to the archive as a
- X whole. This comment may be listed with the lA, LA, v, and V
- X commands. Applying the cA command to an archive that was
- X created with an older version of zoo will result in an error
- X message requesting that the user first pack the archive with
- X the P command. This reorganizes the archive and creates
- X space for the archive comment.
- X
- X The timestamp of an archive may be adjusted with the com-
- X mand:
- X
- X zoo T[q] archive
- X
- X Zoo normally attempts to maintain the timestamp of an
- X archive to reflect the age of the newest file stored in it.
- X Should the timestamp ever be incorrect it can be fixed with
- X the T command.
- X
- X An archive may be packed with the command:
- X
- X zoo P[EPq] archive
- X
- X If the backup copy of the archive already exists, zoo will
- X refuse to pack the archive unless the P modifier is also
- X given. The E modifier causes zoo not to save a backup copy
- X of the original archive after packing. A unique temporary
- X file in the current directory is used to initially hold the
- X packed archive. This file will be left behind if packing is
- X interrupted or if for some reason this file cannot be
- X renamed to the name of the original archive when packing is
- X complete.
- X
- X Packing removes any garbage data appended to an archive
- X because of Xmodem file transfer and also recovers any wasted
- X space remaining in an archive that has been frequently
- X updated or in which comments were replaced. Packing also
- X updates the format of any archive that was created by an
- X older version of zoo so that newer features (e.g. archive-
- X wide generation limit, archive comment) become fully avail-
- X able.
- X
- X Zoo can act as a pure compression or uncompression filter,
- X reading from standard input and writing to standard output.
- X This is achieved with the command:
- X
- X zoo f{cu}[h
- X
- X where c specifies compression, u specifies uncompression,
- X and h used in addition requests the high-performance
- X compression be used. A CRC value is used to check the
- X integrity of the data. The compressed data stream has no
- X internal archive structure and contains multiple files only
- X if the input data stream was already structured, as might be
- X obtained, for example, from tar or cpio.
- X
- X Modem transfers can be speeded up with these commands:
- X
- X zoo fc < file | sz ... rz | zoo fu > file
- X
- X
- X General modifiers
- X
- X The following modifiers are applicable to several commands:
- X
- X c Applied to the a and u commands, this causes the user
- X to be prompted for a comment for each file added to the
- X archive. If the file being added has replaced, or is a
- X newer generation of, a file already in the archive, any
- X comment attached to that file is shown to the user and
- X becomes attached to the newly-added file unless the
- X user changes it. Possible user responses are as
- X described for the -comment command. Applied to the
- X archive list command l, the c modifier causes the list-
- X ing of any comments attached to archived files.
- X
- X . In conjunction with / or // this modifier causes any
- X extracted pathname beginning with `/' to be interpreted
- X relative to the current directory, resulting in the
- X possible creation of a subtree rooted at the current
- X directory. In conjunction with the command P the .
- X modifier causes the packed archive to be created in the
- X current directory. This is intended to allow users
- X with limited disk space but multiple disk drives to
- X pack large archives.
- X
- X d Most commands that act on an archive act only on files
- X that are not deleted. The d modifier makes commands
- X act on both normal and deleted files. If doubled as
- X dd, this modifier forces selection only of deleted
- X files.
- X
- X f Applied to the a and u commands, the f modifier causes
- X fast archiving by adding files without compression.
- X Applied to l it causes a fast listing of files in a
- X multicolumn format.
- X
- X q Be quiet. Normally zoo lists the name of each file and
- X what action it is performing. The q modifier
- X suppresses this. When files are being extracted to
- X standard output, the q modifier suppresses the header
- X preceding each file. When archive contents are being
- X listed, this modifier suppresses any header and
- X trailer. When a fast columnized listing is being
- X obtained, this modifier causes all output to be com-
- X bined into a single set of filenames for all archives
- X being listed.
- X
- X When doubled as qq, this modifier suppresses WARNING
- X messages, and when tripled as qqq, ERROR messages are
- X suppressed too. FATAL error messages are never
- X suppressed.
- X
- X Recovering data from damaged archives
- X
- X The @ modifier allows the user to specify the exact position
- X in an archive where zoo should extract a file from, allowing
- X damaged portions of an archive to be skipped. This modifier
- X must be immediately followed by a decimal integer without
- X intervening spaces, and possibly by a comma and another
- X decimal integer, giving a command of the form l@m or l@m,n
- X (to list archive contents) or x@m or x@m,n (to extract files
- X from an archive). Listing or extraction begin at position m
- X in the archive. The value of m must be the position within
- X the archive of an undamaged directory entry. This position
- X is usually obtained from fiz(1) version 2.0 or later.
- X
- X If damage to the archive has shortened or lengthened it, all
- X positions within the archive may be changed by some constant
- X amount. To compensate for this, the value of n may be
- X specified. This value is also usually obtained from fiz(1).
- X It should be the position in the archive of the file data
- X corresponding to the directory entry that has been specified
- X with m. Thus if the command x@456,575 is given, it will
- X cause the first 456 bytes of the archive to be skipped and
- X extraction to begin at offset 456; in addition, zoo will
- X attempt to extract the file data from position 575 in the
- X archive instead of the value that is found in the directory
- X entry read from the archive. For example, here is some of
- X the output of fiz when it acts on a damaged zoo archive:
- X
- X ****************
- X 2526: DIR [changes] ==> 95
- X 2587: DATA
- X ****************
- X 3909: DIR [copyrite] ==> 1478
- X 3970: DATA
- X 4769: DATA
- X ****************
- X
- X In such output, DIR indicates where fiz found a directory
- X entry in the archive, and DATA indicates where fiz found
- X file data in the archive. Filenames located by fiz are
- X enclosed in square brackets, and the notation "==> 95"
- X indicates that the directory entry found by fiz at position
- X 2526 has a file data pointer to position 95. (This is
- X clearly wrong, since file data always occur in an archive
- X after their directory entry.) In actuality, fiz found file
- X data at positions 2587, 3970, and 4769. Since fiz found
- X only two directory entries, and each directory entry
- X corresponds to one file, one of the file data positions is
- X an artifact.
- X
- X In this case, commands to try giving to zoo might be
- X x@2526,2587 (extract beginning at position 2526, and get
- X file data from position 2587), x@3090,3970 (extract at 3090,
- X get data from 3970) and x@3909,4769 (extract at 3909, get
- X data from 4769). Once a correctly-matched directory
- X entry/file data pair is found, zoo will in most cases syn-
- X chronize with and correctly extract all files subsequently
- X found in the archive. Trial and error should allow all
- X undamaged files to be extracted. Also note that self-
- X extracting archives created using sez (the Self-Extracting
- X Zoo utility for MS-DOS), which are normally executed on an
- X MS-DOS system for extraction, can be extracted on non-MSDOS
- X systems using zoo's damaged-archive recovery method using
- X the @ modifier.
- X
- X Wildcard handling
- X
- X Under the **IX family of operating systems, the shell nor-
- X mally expands wildcards to a list of matching files. Wild-
- X cards that are meant to match files within an archive must
- X therefore be escaped or quoted. When selecting files to be
- X added to an archive, wildcard conventions are as defined for
- X the shell. When selecting files from within an archive,
- X wildcard handling is done by zoo as described below.
- X
- X Under MS-DOS and AmigaDOS, quoting of wildcards is not
- X needed. All wildcard expansion of filenames is done by zoo,
- X and wildcards inside directory names are expanded only when
- X listing or extracting files but not when adding them.
- X
- X The wildcard syntax interpreted by zoo is limited to the
- X following characters.
- X
- X * Matches any sequence of zero or more characters.
- X
- X ? Matches any single character.
- X
- X Arbitrary combinations of * and ? are allowed.
- X
- X / If a supplied pattern contains a slash anywhere in it,
- X then the slash separating any directory prefix from the
- X filename must be matched explicitly. If a supplied
- X pattern contains no slashes, the match is selective
- X only on the filename.
- X
- X c-c Two characters separated by a hyphen specify a charac-
- X ter range. All filenames beginning with those charac-
- X ters will match. The character range is meaningful
- X only by itself or preceded by a directory name. It is
- X not specially interpreted if it is part of a filename.
- X
- X : and ;
- X These characters are used to separate a filename from a
- X generation number and are used when selecting specific
- X generations of archived files. If no generation char-
- X acter is used, the filename specified matches only the
- X latest generation of the file. If the generation char-
- X acter is specified, the filename and the generation are
- X matched independently by zoo's wildcard mechanism. If
- X no generation is specified following the : or ; charac-
- X ter, all generations of that file will match. As a
- X special case, a generation number of 0 matches only the
- X latest generation of a file, while ^0 matches all gen-
- X erations of a file except the latest one. If no
- X filename is specified preceding the generation charac-
- X ter, all filenames will match. As a corollary, the
- X generation character by itself matches all generations
- X of all files.
- X
- X MS-DOS users should note that zoo does not treat the dot as
- X a special character, and it does not ignore characters fol-
- X lowing an asterisk. Thus * matches all filenames; *.*
- X matches filenames containing a dot; *_* matches filenames
- X containing an underscore; and *z matches all filenames that
- X end with the character z, whether or not they contain a dot.
- X
- X Usage hints
- X
- X The Novice command set in zoo is meant to provide an inter-
- X face with functionality and format that will be familiar to
- X users of other similar archive utilities. In keeping with
- X this objective, the Novice commands do not maintain or use
- X any subdirectory information or allow the use of zoo's abil-
- X ity to maintain multiple generations of files. For this
- X reason, users should switch to exclusively using the Expert
- X commands as soon as possible.
- X
- X Although the Expert command set is quite large, it should be
- X noted that in almost every case, all legal modifiers for a
- X command are fully orthogonal. This means that the user can
- X select any combination of modifiers, and when they act
- X together, they will have the intuitively obvious effect.
- X Thus the user need only memorize what each modifier does,
- X and then can combine them as needed without much further
- X thought.
- X
- X For example, consider the a command which is used to add
- X files to an archive. By itself, it simply adds the speci-
- X fied files. To cause only already-archived files to be
- X updated if their disk copies have been modified, it is only
- X necessary to add the u modifier, making the command au. To
- X cause only new files (i.e., files not already in the
- X archive) to be added, the n modifier is used to create the
- X command an. To cause both already-archived files to be
- X updated and new files to be added, the u and n modifiers can
- X be used together, giving the command aun. Since the order
- X of modifiers is not significant, the command could also be
- X anu.
- X
- X Further, the c modifier can be used to cause zoo to prompt
- X the user for a comment to attach to each file added. And
- X the f modifier can cause fast addition (addition without
- X compression). It should be obvious then that the command
- X auncf will cause zoo to update already-archived files, add
- X new files, prompt the user for comments, and do the addition
- X of files without any compression. Furthermore, if the user
- X wishes to move files to the archive, i.e., delete the disk
- X copy of each file after it is added to the archive, it is
- X only necessary to add the M modifier to the command, so it
- X becomes auncfM. And if the user also wishes to cause the
- X archive to be packed as part of the command, thus recovering
- X space from any files that are replaced, the command can be
- X modified to auncfMP by adding the P modifier that causes
- X packing.
- X
- X Similarly, the archive listing commands can be built up by
- X combining modifiers. The basic command to list the contents
- X of an archive is l. If the user wants a fast columnized
- X listing, the f modifier can be added to give the lf command.
- X Since this listing will have a header giving the archive
- X name and a trailer summarizing interesting information about
- X the archive, such as the number of deleted files, the user
- X may wish to "quieten" the listing by suppressing these; the
- X relevant modifier is q, which when added to the command
- X gives lfq. If the user wishes to see the **IX mode (file
- X protection) bits, and also information about multiple gen-
- X erations, the modifiers m (show mode bits) and g (show gen-
- X eration information) can be added, giving the command lfqmg.
- X If the user also wishes to see an attached archive comment,
- X the modifier A (for archive) will serve. Thus the command
- X lfqmgA will give a fast columnized listing of the archive,
- X suppressing any header and trailer, showing mode bits and
- X generation information, and showing any comment attached to
- X the archive as a whole. If in addition individual comments
- X attached to files are also needed, simply append the c
- X modifier to the command, making it lfqmgAc. The above com-
- X mand will not show any deleted files, however; to see them,
- X use the d modifier, making the command lfqmgAcd (or double
- X it as in lfqmgAcdd if only the deleted files are to be
- X listed). And if the user also wishes to see the CRC value
- X for each file being listed, the modifier C will do this, as
- X in the command lfqmgAcdC, which gives a fast columnized
- X listing of all files, including deleted files, showing any
- X archive comment and file comments, and file protection codes
- X and generation information, as well as the CRC value of each
- X file.
- X
- X Note that the above command lfqmgAcdC could also be abbrevi-
- X ated to VfqmgdC because the command V is shorthand for lcA
- X (archive listing with all comments shown). Similarly the
- X command v is shorthand for lA (archive listing with archive
- X comment shown). Both V and v can be used as modifiers to
- X any of the other archive listing commands.
- X
- X Generations
- X
- X By default, zoo assumes that only the latest generation of a
- X specified file is needed. If generations other than the
- X latest one need to be selected, this may be done by specify-
- X ing them in the filename. For example, the name stdio.h
- X would normally refer to the latest generation of the file
- X stdio.h stored in a zoo archive. To get an archive listing
- X showing all generations of stdio.h in the archive, the
- X specification stdio.h:* could be used (enclosed in single
- X quotes if necessary to protect the wildcard character * from
- X the shell). Also, stdio.h:0 selects only the latest genera-
- X tion of stdio.h, while stdio.h:^0 selects all generations
- X except the latest one. The : character here separates the
- X filename from the generation number, and the character * is
- X a wildcard that matches all possible generations. For con-
- X venience, the generation itself may be left out, so that the
- X name stdio.h: (with the : but without a generation number or
- X a wildcard) matches all generations exactly as stdio.h:*
- X does.
- X
- X If a generation is specified but no filename is present, as
- X in :5, :*, or just :, all filenames of the specified genera-
- X tion will be selected. Thus :5 selects generation 5 of each
- X file, and :* and : select all generations of all files.
- X
- X It is important to note that zoo's idea of the latest gen-
- X eration of a file is not based upon searching the entire
- X archive. Instead, whenever zoo adds a file to an archive,
- X it is marked as being the latest generation. Thus, if the
- X latest generation of a file is deleted, then no generation
- X of that file is considered the latest any more. This can be
- X surprising to the user. For example, if an archive already
- X contains the file stdio.h:5 and a new copy is added, appear-
- X ing in the archive listing as stdio.h:6, and then stdio.h:6
- X is deleted, the remaining copy stdio.h:5 will no longer be
- X considered to be the latest generation, and the file
- X stdio.h:5, even if undeleted, will no longer appear in an
- X archive listing unless generation 5 (or every generation) is
- X specifically requested. This behavior will likely be
- X improved in future releases of zoo.
- X
- FILES
- X xXXXXXX - temporary file used during packing
- X archive_name.bak - backup of archive
- X
- SEE ALSO
- X compress(1), fiz(1)
- X
- BUGS
- X When files are being added to an archive on a non-MS-DOS
- X system, it is possible for zoo to fail to detect a full disk
- X and hence create an invalid archive. This bug will be fixed
- X in a future release.
- X
- X Files with generation counts that wrap around from 65535 to
- X 1 are not currently handled correctly. If a file's genera-
- X tion count reaches a value close to 65535, it should be
- X manually set back down to a low number. This may be easily
- X done with a command such as gc-65000, which subtracts 65000
- X from the generation count of each specified file. This
- X problem will be fixed in a future release.
- X
- X Although zoo on **IX systems preserves the lowest nine mode
- X bits of regular files, it does not currently do the same for
- X directories.
- X
- X Currently zoo's handling of the characters : and ; in
- X filenames is not robust, because it interprets these to
- X separate a filename from a generation number. A quoting
- X mechanism will eventually be implemented.
- X
- X Standard input cannot be archived nor can a created archive
- X be sent to standard output. Spurious error messages may
- X appear if the filename of an archive is too long.
- X
- X Since zoo never archives any file with the same name as the
- X archive or its backup (regardless of any path prefixes),
- X care should be taken to make sure that a file to be archived
- X does not coincidentally have the same name as the archive it
- X is being added to. It usually suffices to make sure that no
- X file being archived is itself a zoo archive. (Previous ver-
- X sions of zoo sometimes tried to add an archive to itself.
- X This bug now seems to be fixed.)
- X
- X Only regular files are archived; devices and empty direc-
- X tories are not. Support for archiving empty directories and
- X for preserving directory attributes is planned for the near
- X future.
- X
- X Early versions of MS-DOS have a bug that prevents "." from
- X referring to the root directory; this leads to anomalous
- X results if the extraction of paths beginning with a dot is
- X attempted.
- X
- X VAX/VMS destroys case information unless arguments are
- X enclosed in double quotes. For this reason if a command
- X given to zoo on a VAX/VMS system includes any uppercase
- X characters, it must be enclosed in double quotes. Under
- X VAX/VMS, zoo does not currently restore file timestamps;
- X this will be fixed as soon as I figure out RMS extended
- X attribute blocks, or DEC supplies a utime() function, which-
- X ever occurs first. Other VMS bugs, related to file struc-
- X tures, can often be overcome by using the program bilf.c
- X that is supplied with zoo.
- X
- X It is not currently possible to create a zoo archive con-
- X taining all zoo archives that do not contain themselves.
- X
- DIAGNOSTICS
- X Error messages are intended to be self-explanatory and are
- X divided into three categories. WARNINGS are intended to
- X inform the user of an unusual situation, such as a CRC error
- X during extraction, or -freshening of an archive containing a
- X file newer than one specified on the command line. ERRORS
- X are fatal to one file, but execution continues with the next
- X file if any. FATAL errors cause execution to be aborted.
- X The occurrence of any of these causes an exit status of 1.
- X Normal termination without any errors gives an exit status
- X of 0. (Under VAX/VMS, however, to avoid an annoying mes-
- X sage, zoo always exits with an error code of 1.)
- X
- COMPATIBILITY
- X All versions of zoo on all systems are required to create
- X archives that can be extracted and listed with all versions
- X of zoo on all systems, regardless of filename and directory
- X syntax or archive structure; furthermore, any version of
- X zoo must be able to fully manipulate all archives created by
- X all lower-numbered versions of zoo on all systems. So far
- X as I can tell, this upward compatibility (all manipulations)
- X and downward compatiblity (ability to extract and list) is
- X maintained by zoo versions up to 2.01. Version 2.1 adds the
- X incompatibility that if high-performance compression is
- X used, earlier versions cannot extract files compressed with
- X version 2.1. This is the only incompatibility that is
- X permissible. You are forbidden, with the force of copyright
- X law, to create from the zoo source code any derivative work
- X that violates this compatibility goal, whether knowingly or
- X through negligence. If any violation of this compatibility
- X goal is observed, this should be considered a serious prob-
- X lem and reported to me.
- X
- CHANGES
- X Here is a list of changes occurring from version 1.50 to
- X version 2.01. In parentheses is given the version in which
- X each change occurred.
- X
- X - (1.71) New modifiers to the list commands permit
- X optional suppression of header and trailer information,
- X inclusion of directory names in columnized listings,
- X and fast one-column listings.
- X
- X - (1.71) Timezones are handled.
- X
- X - (1.71) A bug was fixed that had made it impossible to
- X individually update comments for a file whose name did
- X not correspond to MS-DOS format.
- X
- X - (1.71) A change was made that now permits use of the
- X shared library on the **IX PC.
- X
- X - (1.71) VAX/VMS is now supported reasonably well.
- X
- X - (2.00) A comment may now be attached to the archive
- X itself.
- X
- X - (2.00) The OO option allows forced overwriting of
- X read-only files.
- X
- X - (2.00) Zoo will no longer extract a file if a newer
- X copy already exists on disk; the S option will over-
- X ride this.
- X
- X - (2.00) File attributes are preserved for **IX systems.
- X
- X - (2.00) Multiple generations of the same file are sup-
- X ported.
- X
- X - (2.00) Zoo will now act as a compression or decompres-
- X sion filter on a stream of data and will use a CRC
- X value to check the integrity of a data stream that is
- X uncompressed.
- X
- X - (2.00) A bug was fixed that caused removal of a direc-
- X tory link if files were moved to an archive by the
- X superuser on a **IX system.
- X
- X - (2.00) The data recovery modifier @ was greatly
- X enhanced. Self-extracting archives created for MS-DOS
- X systems can now be extracted by zoo on any system with
- X help from fiz(1).
- X
- X - (2.01) A bug was fixed that had caused the first gen-
- X eration of a file to sometimes unexpectedly show up in
- X archive listings.
- X
- X - (2.01) A bug was fixed that had caused the MS-DOS ver-
- X sion to silently skip files that could not be extracted
- X because of insufficient disk space.
- X
- X - (2.01) A bug was fixed that had sometimes made it
- X impossible to selectively extract a file by specifying
- X its name, even though all files could be extracted from
- X the archive by not specifying any filenames. This
- X occurred when a file had been archived on a longer-
- X filename system (e.g. AmigaDOS) and extraction was
- X attempted on a shorter-filename system (e.g. MS-DOS).
- X
- X - (2.01) A change was made that will make zoo preserve
- X the mode (file protection) of a zoo archive when it is
- X packed. This is effective only if zoo is compiled to
- X preserve and restore file attributes. Currently this
- X is so only for **IX systems.
- X
- X - (2.01) A bug was fixed that had caused an update of an
- X archive to not always add all newer files.
- X
- X - (2.01) Blanks around equal signs in commands given to
- X "make" were removed from the mk* scripts for better
- X compatiblity with more **IX implementations including
- X Sun's.
- X
- X - (2.1) Compression is now greatly improved if the "h"
- X option is used.
- X
- X - (2.1) The default behavior is to preserve full path-
- X names during extraction.
- X
- X - (2.1) On some systems, extraction of files using the
- X older (default) compression method is greatly speeded
- X up.
- X
- X - (2.1) Extended multiscreen help is available.
- X
- X - (2.1) Memory allocation is improved, so that the MS-DOS
- X version will not prematurely abort when updating a
- X large archive.
- X
- X - (2.1) The VAX/VMS version preserves file timestamps
- X during extraction.
- X
- X - (2.1) The default archive-wide generation limit, when
- X generations are enabled, is 3.
- X
- FUTURE DIRECTIONS
- X A revised version of zoo is in the works that will be able
- X to write newly-created archives to standard output and will
- X support multivolume archives. It will be upward and down-
- X ward compatible with this version of zoo.
- X
- ACKNOWLEDGEMENTS
- X The zoo archiver was initially developed using Microsoft C
- X 3.0 on a PC clone manufactured by Toshiba of Japan and
- X almost sold by Xerox. Availability of the following systems
- X was helpful in achieving portability: Paul Homchick's Compaq
- X running Microport System V/AT; The Eskimo BBS somewhere in
- X Oregon running Xenix/68000; Greg Laskin's system 'gryphon'
- X which is an Intel 310 running Xenix/286; Ball State
- X University's AT&T 3B2/300, UNIX PC, and VAX-11/785 (4.3BSD
- X and VAX/VMS) systems. In addition J. Brian Waters provided
- X feedback to help me make the code compilable on his Amiga
- X using Manx/Aztec C. The executable version 2.0 for MS-DOS
- X is currently compiled with Borland's Turbo C++ 1.0.
- X
- X Thanks are due to the following people and many others too
- X numerous to mention.
- X
- X J. Brian Waters <jbwaters@bsu-cs.bsu.edu>, who has worked
- X diligently to port zoo to AmigaDOS, created Amiga-specific
- X code, and continues keeping it updated.
- X
- X Paul Homchick <rutgers!cgh!paul>, who provided numerous
- X detailed reports about some nasty bugs.
- X
- X Bill Davidsen <davidsen@crdos1.crd.ge.com>, who provided
- X numerous improvements to this manual, contributed mul-
- X tiscreen help, and provided many useful bug reports, bug
- X fixes, code improvements, and suggestions.
- X
- X Mark Alexander <amdahl!drivax!alexande>, who provided me
- X with some bug fixes.
- X
- X Haruhiko Okumura, who wrote the ar archiver and some excel-
- X lent compression code, which I adapted for use in zoo.
- X
- X Randal L. Barnes <rlb@skyler.mavd.honeywell.com>, who (with
- X Randy Magnuson) wrote the code to support the preservation
- X of file timestamps under VAX/VMS.
- X
- X Raymond D. Gardner, who contributed replacement uncompres-
- X sion code that on some systems is twice as fast as the
- X original.
- X
- X Greg Yachuk and Andre Van Dalen, who independently modified
- X MS-DOS zoo to support multivolume archives. (This support
- X is not yet in this official release.)
- X
- AUTHOR
- X Rahul Dhesi
- SHAR_EOF
- chmod 0644 zoo.man ||
- echo 'restore of zoo.man failed'
- Wc_c="`wc -c < 'zoo.man'`"
- test 50054 -eq "$Wc_c" ||
- echo 'zoo.man: original size 50054, current size' "$Wc_c"
- fi
- true || echo 'restore of zooadd.c failed'
- echo End of part 12, continue with part 13
- exit 0
-