home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ZOO(1) **IX Programmer's Manual ZOO(1)
-
-
-
- NAME
- zoo - manipulate archives of files in compressed form
-
- SYNOPSIS
- zoo {acDehlLPTuUvx}[cdEfnMNoOpPquv1:./@] archive [file] ...
- zoo -command archive [file] ...
- zoo h
-
- DESCRIPTION
- Zoo is used to create and maintain collections of files in
- compressed form. It uses a Lempel-Ziv compression algorithm
- that gives space savings in the range of 20% to 80% depend-
- ing on the type of file data.
-
- The command zoo h gives summary of commands.
-
- Zoo will not add an archive to itself, nor add the archive's
- backup (with `.bak' extension to the filename) to the
- archive.
-
- Zoo has two types of commands: Expert commands, which con-
- sist of one command letter followed by zero or more modifier
- characters, and Novice commands, which consist of a hyphen
- (`-') followed by a command word that may be abbreviated.
- Expert commands are case-sensitive but Novice commands are
- not.
-
- When zoo adds a file to an existing archive, it marks as
- deleted any already-archived file with the same name (any
- directory prefix being ignored in this comparison). Deleted
- files may be later undeleted. Archives may be packed to
- recover space occupied by deleted files.
-
- All commands assume that the archive name ends with the
- characters `.zoo' unless a different extension is supplied.
-
- Novice commands
-
- Novice commands may be abbreviated to a hyphen followed by
- at least one command character. Each Novice command works
- in two stages. First, the command does its intended work.
- Then, if the result was that one or more files were deleted
- in the specified archive, the archive is packed. If packing
- occurs, the original unpacked archive is always left behind
- in the current directory, with an extension of `.bak'. The
- Novice commands are as follows.
-
- -add Adds the specified files to the archive.
-
- -freshen
- Adds a specified file to the archive if and only if an
- older file by the same name already exists in the
-
-
-
- Printed 2/6/87 February 6, 1987 1
-
-
-
-
-
-
- ZOO(1) **IX Programmer's Manual ZOO(1)
-
-
-
- archive.
-
- -delete
- Deletes the specified files from the archive.
-
- -update
- Adds a specified file to the archive either: if an
- older file by the same name already exists in the
- archive or: if a file by the same name does not
- already exist in the archive.
-
- -extract
- Extracts the specified files from the archive. If no
- file is specified all files are extracted.
-
- -move
- Equivalent to -add except that source files are deleted
- after addition.
-
- -print
- Equivalent to -extract except that extracted data are
- sent to standard output.
-
- -list
- Gives information about the specified archived files
- including any attached comments. If no files are
- specified all files are listed. Deleted files are not
- listed.
-
- -test
- Equivalent to -extract except that the extracted data
- are not saved but any errors encountered are reported.
-
- -comment
- Allows the user to add or update comments attached to
- archived files. When prompted, the user may: type a
- carriage return to skip the file, leaving any current
- comment unchanged; or type a (possibly null) comment
- of up to 65,535 characters terminated by `/end' (case-
- insensitive) on a separate line; or type the end-of-
- file character (normally control D) to skip all remain-
- ing files.
-
- -delete
- Deletes the specified files.
-
- The correspondence between Novice and Expert commands is as
- follows.
-
- Novice Equivalent
- Command Description Expert Command
- ------- ----------- --------------
-
-
-
- Printed 2/6/87 February 6, 1987 2
-
-
-
-
-
-
- ZOO(1) **IX Programmer's Manual ZOO(1)
-
-
-
- -add add files to archive aP
- -extract extract files from archive x
- -move move files to archive aMP
- -test test archive integrity xNd
- -print extract files and send to standard output xp
- -delete delete files from archive DP
- -list list information about archived files v
- -update update archive by adding new or newer files aunP
- -freshen freshen archive by adding newer files auP
- -comment allows user to attach comments to files c
-
- Expert commands
-
- The general format of expert commands is:
-
- zoo {acDehlPTuUvx}[cdEfnMNoOpPquv1:./@] archive [file] ...
-
- The characters enclosed within {} are commands. Choose any
- one of these. The characters enclosed within [] just to the
- right of the {} are modifiers and zero or more of these may
- immediately follow the command character. All combinations
- of command and modifier characters may not be valid.
-
- Files are added to an archive with the command:
-
- zoo {au}[cfMnPqu:] archive file ...
-
- Command characters are:
-
- a Add each specified file to archive. Any already-
- archived file with the same name is marked as deleted.
-
- u Do an update of the archive. A specified file is added
- to the archive only if a copy of it is already in the
- archive and the copy being added is newer than the copy
- already in the archive.
-
- The following modifiers are specific to these commands.
-
- M Move files to archive. This makes zoo unlink the ori-
- ginal files after they have been added to the archive.
- Files are unlinked after addition of files to the
- archive is complete, and after any requested packing of
- the archive has been done, and only if zoo detected no
- errors.
-
- n Add new files only. A specified file is added only if
- it isn't already in the archive.
-
- P Pack archive after files have been added.
-
-
-
-
-
- Printed 2/6/87 February 6, 1987 3
-
-
-
-
-
-
- ZOO(1) **IX Programmer's Manual ZOO(1)
-
-
-
- u Applied to the a command, this modifier makes it behave
- identically to the u command.
-
- The combination of the n modifier with the u modifier or u
- command causes addition of a file to the archive either if
- the file is not already in the archive, or if the file is
- already in the archive but the archived copy is older than
- the copy being added.
-
- : Do not store directory names. In the absence of this
- modifier zoo stores the full pathname of each archived
- file.
-
- Files are extracted from an archive with the command:
-
- zoo {ex}[dNoOpq./@] archive [file] ...
-
- The e and x commands are synonymous. If no file was speci-
- fied, all files are extracted from the archive. All
- extracted files go into the current directory.
-
- The following modifiers are specific to the e and x com-
- mands:
-
- N Do not save extracted data but report any errors
- encountered.
-
- O Overwrite files. Normally, if a file being extracted
- would overwrite an already-existing file of the same
- name, zoo asks you if you really want to overwrite it.
- You may answer the question with `y', which means yes,
- overwrite; or `n', which means no, don't overwrite; or
- `a', which means assume the answer is `y' for this and
- all subsequent files. The O modifier makes zoo assume
- that files may always be overwritten.
-
- The O, N, and p modifiers are mutually exclusive.
-
- o This is equivalent to the O modifier if and only if it
- is given at least twice. It is otherwise ignored.
-
- p Pipe extracted data to standard output. Error messages
- are piped to standard output as well. However, if a
- bad CRC is detected, an error message is sent both to
- standard error and to standard output.
-
- / Extract to original pathname. Any needed directories
- must already exist. In the absence of this modifier
- all files are extracted into the current directory. If
- this modifier is doubled as // needed directories need
- not exist and are created if necessary.
-
-
-
-
- Printed 2/6/87 February 6, 1987 4
-
-
-
-
-
-
- ZOO(1) **IX Programmer's Manual ZOO(1)
-
-
-
- . In conjunction with / or // this modifier causes any
- pathname beginning with `/' to be interpreted relative
- to the current directory, resulting in the possible
- creation of a subtree rooted at the current directory.
-
- Archived files are listed with the command:
-
- zoo {lLv}[adfv@] archive[.zoo] [file] ...
-
- l Information presented includes the date and time of
- each file, its original and current (compressed) sizes,
- and the percentage size decrease due to compression
- (labelled CF or compression factor). If no filename is
- supplied all files are listed except deleted files.
-
- L This is identical to the l command except that all sup-
- plied arguments must be archives and the contents of
- each are listed.
-
- v This causes a verbose listing, which additionally shows
- any comment attached to each file. Using the v modif-
- ier with the l command has the same effect.
-
- The following modifier is specific to the archive list com-
- mands:
-
- a This gives a single-line format containing both each
- filename and the name of the archive, sorted by archive
- name. It is especially useful with the L command,
- since the result can be further sorted on any field to
- give a master listing of the entire contents of a set
- of archives.
-
- Files may be deleted and undeleted from an archive with the
- following commands:
-
- zoo {DU}[Pq1] archive file ...
-
- The D command deletes the specified files and the U command
- undeletes the specified files. The 1 modifier (the digit
- one, not the letter ell) forces deletion or undeletion of at
- most one file. If multiple instances of the same file exist
- in an archive, use of the 1 modifier may allow selective
- extraction of one of these.
-
- Comments may be added to an archive with the command:
-
- zoo c archive
-
- This behaves identically to the -comment command.
-
-
-
-
-
- Printed 2/6/87 February 6, 1987 5
-
-
-
-
-
-
- ZOO(1) **IX Programmer's Manual ZOO(1)
-
-
-
- The timestamp of an archive may be adjusted with the com-
- mand:
-
- zoo T[q] archive
-
- Zoo normally attempts to maintain the timestamp of an
- archive to reflect the age of the newest file stored in it.
- Should the timestamp ever be incorrect it can be fixed with
- the T command.
-
- An archive may be packed with the command:
-
- zoo P[EPq] archive
-
- If the backup copy of the archive already exists, zoo will
- refuse to pack the archive unless the P modifier is also
- given. The E modifier causes zoo not to save a backup copy
- of the original archive after packing. A unique temporary
- file in the current directory is used to initially hold the
- packed archive. This file will be left behind if packing is
- interrupted or if for some reason this file cannot be
- renamed to the name of the original archive when packing is
- complete.
-
- Packing removes any garbage data appended to an archive
- because of Xmodem file transfer and also recovers spaced
- used by comments that were replaced.
-
- General modifiers
-
- The following modifiers are applicable to several commands:
-
- c Applied to the a and u commands, this causes the user
- to be prompted for a comment for each file added to the
- archive. If the file being added has replaced a file
- already in the archive, any comment attached to the
- replaced file is shown to the user and becomes attached
- to the newly-added file unless the user changes it.
- Possible user responses are as described for the -com-
- ment command. Applied to the archive list command l,
- the c modifier causes attached comments to archived
- files to be listed.
-
- d Most commands that act on an archive act only on files
- that are not deleted. The d modifier makes commands
- act on both normal and deleted files. If doubled as
- dd, this modifier forces selection only of deleted
- files.
-
- f Applied to the a and u commands, the f modifier causes
- fast archiving by adding files without compression.
- Applied to l it causes a fast listing of files in a
-
-
-
- Printed 2/6/87 February 6, 1987 6
-
-
-
-
-
-
- ZOO(1) **IX Programmer's Manual ZOO(1)
-
-
-
- multicolumn format.
-
- q Be quiet. Normally zoo lists the name of each file and
- what action it is performing. The q modifier
- suppresses this. When files are being extracted to
- standard output, the q modifier suppresses the header
- preceding each file.
-
- Error messages are never suppressed.
-
- @ Extract or list beginning at position n, where n is a
- decimal number following the @ sign without any inter-
- vening spaces. This may be used to recover data from a
- damaged archive by skipping the damaged part. The
- number specified must be the position within the
- archive of an undamaged directory entry. This position
- is usually obtained from fiz(1).
-
- Wildcard handling
-
- The shell normally expands wildcards to a list of matching
- files. Wildcards that are meant to match files within an
- archive must therefore be escaped or quoted. The wildcard
- syntax interpreted by zoo is limited to the following char-
- acters.
-
- * Matches any sequence of zero or more characters not
- containing a dot; however, see below.
-
- ? Matches any single character except a dot; however,
- see below.
-
- Arbitrary combinations of ``*'' and ``?'' are allowed.
-
- / If a supplied pattern contains a slash anywhere in it,
- then the slash separating any directory prefix from the
- filename must be matched explicitly. As a special
- case, if a supplied pattern contains no slashes, it is
- treated as if it contained a leading `**/' and the
- match is therefore selective only on the filename.
-
- . Normally required to match a dot in any filename. How-
- ever, if a supplied pattern contains a double asterisk
- `**', the dot need not be explicitly supplied. Thus
- `zoo.c' will be matched by `*.c' and by `**c' but not
- by `*c'.
-
- As a special case, the wildcard sequence ``*.*''
- matches every sequence of trailing characters in a
- filename including those that do not contain a dot.
-
-
-
-
-
- Printed 2/6/87 February 6, 1987 7
-
-
-
-
-
-
- ZOO(1) **IX Programmer's Manual ZOO(1)
-
-
-
- c-c Two characters separated by a hyphen specify a charac-
- ter range. All filenames beginning with those charac-
- ters will match. The character range may be specified
- only by itself or preceded by a directory name. It is
- not specially interpreted if it is part of a filename.
-
- FILES
- xXXXXXX - temporary file used during packing
- archive_name.bak - backup of archive
-
- SEE ALSO
- compress(1), fiz(1)
-
- BUGS
- Standard input cannot be archived nor can a created archive
- be sent to standard output. Spurious error messages may
- appear if the filename of an archive is too long. The
- filename `+' is reserved for future use and will not be
- recognized if explicitly specified; however, it may be
- matched with a pattern.
-
- DIAGNOSTICS
- Error messages are intended to be self-explanatory and are
- divided into three categories. WARNINGS are intended to
- inform the user of an unusual situation, such as a CRC error
- during extraction, or -freshening of an archive containing a
- file newer than one specified on the command line. ERRORS
- are fatal to one file, but execution continues with the next
- file if any. FATAL errors cause execution to be aborted.
- The occurrence of any of these causes an exit status of 1.
- Normal termination without any errors gives an exit status
- of 0.
-
- FUTURE DIRECTIONS
- A revised version of zoo is in the works which will allow
- numbering of multiple versions of a file and automatically
- perform end-of-line conversion for text files moved between
- dissimilar systems. It will be upward and downward compati-
- ble with existing versions of zoo.
-
- AUTHOR
- Rahul Dhesi
-
-
-
-
-
-
-
-
-
-
-
-
-
- Printed 2/6/87 February 6, 1987 8
-
-
-
-