allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc) (07/28/89)
Posting-number: Volume 7, Issue 103 Submitted-by: dhesi@bsu-cs.bsu.edu (Rahul Dhesi) Archive-name: zooman.man The zoo archiver version 2.01 appeared in comp.sources.misc in early 1989. Here is an enhanced user manual for it written by Bill Davidsen. This posting contains the version suitable for nroff/troff. The next one contains the formatted manual. Rahul Dhesi <dhesi@bsu-cs.bsu.edu> UUCP: ...!{iuvax,pur-ee}!bsu-cs!dhesi Checksum: 3575537122 (verify with "brik -cv") #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create: # uguide.n # This archive created: Tue Jul 25 21:56:21 1989 export PATH; PATH=/bin:/usr/bin:$PATH echo shar: "extracting 'uguide.n'" '(51469 characters)' if test -f 'uguide.n' then echo shar: "will not over-write existing file 'uguide.n'" else sed 's/^X//' << \SHAR_EOF > 'uguide.n' X.PH X\" this guide should be runoff using the mm macros X\" X\" set the T/C depth X.nr Cl 3 X\" set the paragraph indent X.nr Pi 2 X\" begin section macro X.de BS X.bp X.PF "''\\$1''" X.OF "'rev 1.19 - 11/9/88'For zoo 2.01'Page %'" X.EF "'page %'For zoo 2.01'rev 1.19 - 11/9/88'" X.. X.ls 2 X\" This is the way to highlight the name zoo, when in text X.ds z \\fIzoo\\fR X.if n .ds co "(c) X\" This is how to call in constant width fonts on troff X.if t .cs H 22 X.de CW X.ie '\\$1'' .ft H X.el \\fH\\$1\\fR X.. X.de CE X.ft R X.. X\& X.sp 3i X.ce 4 X\s+6The \fIzoo\fR Archiver XUser's Guide\s-6 XBill Davidsen X.sp Xrev 1.19, modified 11/9/88 X.sp 1i X.ce XCopyright \*(co 1988 by Bill Davidsen, all rights reserved. X.bp X.P XThis document may be distributed unmodified by anyone for any purpose. XCopies of this guide may be freely duplicated and distributed in any Xform but may not be sold at a profit. X.sp X.B Trademarks X.P XMS-DOS is a trademark of Microsoft, UNIX is a trademark of AT&T, and XARC is a trademark of System Enhancement Associates. VMS and VAX are Xtrademarks of Digital Equipment Corp. X.de PX \" set binding margins here X.if o .po 1i X.if e .po .5i X.. X.pn 1 X.BS "Introduction X.H 1 Introduction X.H 2 "What's an archiver, and why do I want one? X.P X.IX "archive X.IX "introduction X.IX "MS-DOS X.IX "UNIX X.IX "compress X.IX "SQ X.IX "LBR XAn archive program is one which performs two functions; to compress the Xdata for a file, such as MS-DOS\*(Tm SQ, or UNIX\*(Tm compress, and to Xallow storage of a number of files in a single file, such as MS-DOS LBR Xor UNIX tar or cpio. X.P XBecause many files have been stored as a single file they can be easily Xmoved or backed up to another disk or tape. The compressed files take Xless space on disk than the originals, and access to other files may be Xfaster since the directory will be less cluttered. X.H 2 "What's zoo? X.P X\*z is an archive program written by Rahul Dhesi, which offers all of Xthese benefits, and which also offers your choice of a \fInovice\fR Xor an \fIexpert\fR user interface. Additional support programs are Xavailable for MS-DOS, UNIX, and several other systems. X.H 2 "How to use this guide X.P XThe User's Guide is not intended to replace the manual. The manual is Xconcise and complete, but not in many cases easy to use and understand. XThe User's Guide is intended to be easy to use and understand, with Xexamples allowing a new user to learn the use of \*z without Xinstruction. X.P XThis guide is organized by function. If you want to add a file to an Xarchive, for instance, you go to the "add file" section and read about Xhow to do it. The simplest case is presented first, followed by Xdiscussion of options and related topics. X.ne 6 X.P X\*z provides the following capabilities: X\fBadd\fR files to an archive, \fBextract\fR files from an archive, X\fBlist\f the files in an archive, X\fBdelete\fR files from an existing archive, Xand \fBreplace\fR old files with a newer version. All of these basic Xfunctions are available with options. XDetails on how to use each of these follows. X.H 1 "Using \*z X.P X.IX "novice commands X.IX "expert commands X\*z has two sets of commands, the \fInovice\fR commands and X\fIexpert\fR commands. The \fInovice\fR commands are easy to learn and Xuse, and allow you to do the common archiver commands. The \fIexpert\fR Xcommands are somewhat more complex to use, and provide access to all of Xthe capabilities of \*z, particularly those which are not available in Xmost other archivers. Note that you can get a reminder of the novice Xcommands just by typing the \*z command with no arguments, or the Xexpert commands by typing "zoo\ h". X.H 2 "Filenames X.H 3 "The name of the archive file X.P X.IX "archive filename XSince \*z is going to take a number of files and place them in one Xarchive file, there the name of the archive file must be specified. \*z Xarchives are usually named something.zoo, just as ARC\*(Tm files are named Xsomething.arc, etc. However, the archives may have other names, Xdepending on the operating system. If the archive name specified by the Xuser contains at least one dot (.) the suffix zoo will not be added. X.P XWhen you provide the name of an archive on the command line, if the Xname does not contain a dot the extension ".zoo" will be added. This Xmeans that if you use the name "docs" the actual archive will be named X"docs.zoo", while if you use the name "my.doc" that will be the actual Xfilename. Using names which don't end in .zoo may cause you confusion, Xand should be done only when you will still be able to identify the file Xas a \*z archive. X.H 3 "The names of files in the archive X.P X.IX "filename limitations X.IX "limitations, filename XThe names of files in an archive are limited only by the operating Xsystem. Under MS-DOS the names are eight characters for the name, Xfollowed by a dot, followed by three characters for the extension. XUnder VMS\*(Tm the name and extension may each be up to 32 characters Xlong, and under UNIX the names may be as long as the system allows X(always at least 14 characters) and may be any legal name. Other Xoperating systems may have other rules for filenames. In general files Xwith names consisting of not more than 8 characters, a dot, and not Xmore than three characters are supported by most common operating Xsystems. X.H 3 "Treatment of wildcards X.P X.IX "wildcards XIf you are familiar with the way the UNIX operating system expands Xwildcard names, you understand how zoo treats wildcards. For MS-DOS Xusers the action is most similar to the DIR command, rather than the XCOPY usage. X.ne 6 XIf you type "a*" it means "all names beginning with a" even Xif they have an extension. Also, the construct "*a" will match all Xfilenames ending in "a", such as "data" or "left.pa". XFor a complete discussion see the manual. X.BS "zoo commands X.H 1 "Common zoo operations X.H 2 "Adding data to an archive X.P X.IX "adding file to an archive X.IX "-add command, add files X.IX "a command, add files XWhen you add a file to an archive, a copy of the file is placed in the Xarchive in a compressed format. The original file is left unchanged for Xother use. The simplest way to add data to an archive is with the Xnovice command: X.ti +.5i X.CW "zoo -add zoofile myfile X.sp XWhich compresses the file \fImyfile\fR and adds it to \fIzoofile.zoo\fR. XYou can have several files named on the command line, either explicitly Xor with wildcards. X.DS X.nf XAdd files examples: X.in +.5i X.CW "zoo -add zoofile myfile.dat myfile.doc X.sp X.CW "zoo a zoofile myfile.* X.DE X.P XNote that if there is already a file in the archive having the same Xname as a file you are adding, it will be replaced by the new file. If Xyou want to prevent this, there is an expert option 'n' which says only Xadd files which are not in the archive already. X.DS XFor example the two command sequence: X.in +.5i X.nf X.CW Xzoo a arch myfile.src Xzoo an arch myfile.dat myfile.src myfile.doc X.CE X.DE X.P X.IX "n option, add new files only XNote that the file "myfile.src" was added to the archive with the first Xcommand, and therefore will not be added by the second. X.H 3 "Updating files in an archive X.P X.IX "updating files X.IX "-freshen command, update existing files X.IX "u option, update existing files XThere may be times when you want to be sure the archive contains the Xlatest versions of all the files, without adding any new files. This may Xbe done with the '-freshen' novice command, or the Xoption, 'u', controls this in the expert mode. X.DS XYou may enter the command as either: X.ti +.5i X.CW "zoo au arch myfiles.* X.br X- or - X.ti +.5i X.CW "zoo -freshen arch myfiles.* X.DE X.sp Xwhere any file which had been changed would be replaced with the newer Xversion, while any files which were not in the archive would be ignored. X.H 3 "Adding only new files to an archive X.P X.IX "adding new files only X.IX "new files, adding X.IX "n option, add new files XIf you want to add some new files to an archive, but don't want to Xchange the existing files in the archive, even if they are not the Xlatest version, you can specify leaving the existing files unchanged by Xuse of the 'n' option in expert mode. X.DS XIn expert mode only: X.ti +.5i X.CW "zoo an arch myfiles.* X.DE Xwill do just that. If a file is in the archive it is not changed, but if Xit's not in the archive it will be added. X.H 3 "Bringing an archive up to date X.P X.IX "-update command, add new or changed files X.IX "aun command, add new or changed files XWhen keeping the parts of a package in a zoo archive, one of the common Xoperations is to move all newly created files into the archive, and to Xupdate the files which are in the archive but have been modified since Xthey were saved. X.DS XThe easiest way is with the novice command: X.ti +.5i X.CW "zoo -update arch myfiles.* X.br Xand can also be done with the expert command: X.ti +.5i X.CW "zoo aun arch myfiles.* X.DE X.P X.IX "-freshen X.IX "-update XNote the difference between '-freshen' and '-update'. The freshen Xcommand does not add new files to the archive, it just insures that the Xfile already in the archive are the latest versions. The '-update' Xcommand makes sure that the archive contains all of the files you need. X.P XThe reason for not using update in all cases is that you may have a lot Xof files with unrelated names in a directory, and want to save only a Xfew. The freshen command allows you to specify all the files in the Xdirectory, and have \*z select those which should be saved. X.DS XTo do this you can type: X.ti +.5i X.CW "zoo -freshen arch * X.DE X.H 3 "Moving files into an archive X.P X.IX "-move command, move files into archive X.IX "M option, move files into archive X.IX "delete after archiving XSince one common reason for using an archive is to save space, Xfrequently you will want to put files into a archive, and then delete Xthe original, full size, files. X.DS XThe novice command to do this is: X.ti +.5i X.CW "zoo -move arch file1 file2 X.br Xor using the the 'M' option to the 'a' expert command: X.ti +.5i X.CW "zoo aM arch file1 file2 X.DE XIn either case the original files will not be deleted until \fIall\fR Xfiles have been added to the archive and the archive has been closed. X.H 2 "Listing the archive contents X.P XA \*z archive may be listed, giving the contents of the archive with Xvarious detail and options. A complete list of options is found in the XUser's Manual. X.H 3 "Getting a default listing X.DS X.IX "-list command, default format file listing XThe common listing is done by: X.ti +.5i X.CW "zoo -list arch X.nf X.sp XWhich might produce a listing like: X.sp X.in +.5i X.CW XArchive FIZsim.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 3849 43% 2211 3 Feb 88 21:55:56 69e7 fiz.1 X 6864 48% 3563 3 Feb 88 21:52:16 d14e fiz.c X-------- --- -------- --------- -------- X 10713 46% 5774 2 files X.CE X.DE X.P X.IX "listing details X.IX "reading a listing XLet's look at the listing. The first line is the name of the archive, Xfollowed by the line giving the headers for all of the columns. The Xfirst column contains the original length of the file before Xcompression, the second the percent of compression, and the third the Xsize of the file in the archive. Remember that the checksum, date, and Xthe filename are there, too. X.P XColumn four is the date when the file was last modified, and five is the Xtime. The sixth column contains the checksum, discussed in the concepts Xsection. Finally the name of the file is displayed, either as just a Xfilename or as a complete name if a subdirectory was specified when the Xfile was saved. X.P X.IX "totals line XThe totals line gives the total of all file sizes, useful when you check Xto see if you have room to unpack, the average percent compression, and Xthe compressed file size. At the end of the totals is the number of Xfiles displayed. Remember that the file count is files displayed, and Xmay not include all of the files in the archive (see the concepts Xsection on deleted files and generations). X.H 3 "list files, expert command X.P X.IX "l command, list archive contents X.IX "f option, fast listing X.IX "q option, list without headings X.IX "headings, list without, q option XThe expert form of the list command allows a short form of the listing, Xhaving no checksum information displayed. It is otherwise identical to Xthe the display produced by the -list command. If the 'f' option is Xused, only the filenames are displayed, with several filenames on a Xline. If you use the 'q' (quiet) option, all of the headings and totals Xare deleted as well. X.DS XUsing an archive with a number of files, we see this. X.nf X.sp X.in +.5i X.CW XArchive FIZbig.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 455 4% 438 17 Aug 88 14:12:36 addbfcrc.o X 1280 24% 970 17 Aug 88 14:12:52 addfname.o X 1069 16% 900 17 Aug 88 14:13:02 basename.o X 3509 26% 2611 17 Aug 88 14:13:28 comment.o X 814 0% 814 17 Aug 88 14:13:34 crcdefs.o X 3655 26% 2717 17 Aug 88 14:22:02 fiz.o X 792 13% 688 17 Aug 88 14:13:44 getfile.o X 2465 20% 1972 17 Aug 88 14:14:02 lzc.o X 2543 18% 2082 17 Aug 88 14:14:22 lzd.o X-------- --- -------- --------- -------- X 16582 20% 13192 9 files X.CE X.DE X.DS X.nf X.sp XBy using the 'f' option we get: X.sp X.in +.5i X.CW XArchive FIZbig.zoo: Xaddbfcrc.o addfname.o basename.o comment.o crcdefs.o Xfiz.o getfile.o lzc.o lzd.o X.CE X.DE X.sp X.DS X.nf XIf we add the 'q' option to delete the summary: X.sp X.in +.5i X.CW Xaddbfcrc.o addfname.o basename.o comment.o crcdefs.o Xfiz.o getfile.o lzc.o lzd.o X.CE X.DE X.P XYou may also want to read the section on advanced listing, which Xincludes a section on keeping track of several archive, including how to Xbuild a rudimentary database of which files are in which archives. X.H 2 "Extracting files from your archive X.H 3 "Unpacking an entire archive X.P X.IX "-extract command, extract for archive X.IX "x command, extract from archive X.IX "extract file from archive XIf you want to extract all of the files in an archive to their original Xsize and date, you can use the novice '-extract' command, or the expert X'x' command. X.DS X.nf XNovice and expert unpack archive: X.in +.5i X.CW "zoo -extract arch X.sp X.CW "zoo x arch X.DE XIn both cases all files will be extracted. X.H 3 "Unpacking selected files from an archive X.P X.IX "extracting selected files XIf you wish to extract a single file from an archive, you simply add the Xfile name to the command line after the archive name. The effect is Xidentical. X.DS X.nf XExtract individual file or files X.in +.5i X.CW Xzoo -extract arch myfile.3 X.sp Xzoo x arch myfile.3 X.sp Xzoo x arch myfile.3 myfile.4 X.sp Xzoo x arch *.bas X.CE X.DE XThe first two examples do the same thing, using the novice and expert Xcommands respectively. In the third example several of files are being Xextracted at the same time. The use of wildcards is also permitted, as Xshown in the fourth example. this will extract all BASIC files from the Xarchive. The example is for MS-DOS, UNIX and other users should see the Xdiscussion of wildcards and the manual for additional discussion of Xthis. X.H 2 "Deleting files X.P X.IX "deleting files XWhen a file is "deleted" from an archive, it is marked as no longer Xwanted. If you are using the novice commands the file will be Xphysically removed from the archive after the delete command has been Xexecuted, and a copy of the archive with the file marked deleted but Xstill physically in the archive will be called something.bak. If your Xarchive were called docs.zoo, the backup would be called docs.bak. The Xexpert commands allow you to leave deleted files in the archive, until Xyou explicitly remove them with the pack command. X.IX "-delete command, delete files X.IX "D command, delete files XFiles are deleted from an archive using the "-delete" novice command or Xthe "D" expert command. X.DS X.nf XConsider the archive below: X.sp X.in +.5i X.CW XArchive FIZ.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 3849 43% 2211 3 Feb 88 21:55:56 fiz.1 X 6864 48% 3563 3 Feb 88 21:52:16 fiz.c X 3849 43% 2211 6 Sep 88 09:33:54 t1/fiz.1 X-------- --- -------- --------- -------- X 14562 45% 7985 3 files X.CE X.DE X.DS X.nf XIf you delete a file and list using the novice command: X.sp X.CW X.in +.5i Xzoo -delete FIZ fiz.c Xzoo l FIZ X.sp XArchive FIZ.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 3849 43% 2211 3 Feb 88 21:55:56 fiz.1 X 3849 43% 2211 6 Sep 88 09:33:54 t1/fiz.1 X-------- --- -------- --------- -------- X 7698 43% 4422 2 files X.CE X.DE X.DS X.nf XWhile if I use the expert commands: X.CW X.sp X.in +.5i Xzoo D FIZ fiz.c Xzoo l FIZ X.sp XArchive FIZ.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 3849 43% 2211 3 Feb 88 21:55:56 fiz.1 X 3849 43% 2211 6 Sep 88 09:33:54 t1/fiz.1 X-------- --- -------- --------- -------- X 7698 43% 4422 2 files X------------ XThere is 1 deleted file. X.CE X.DE X.P XIn addition to the explicit delete command, files are deleted when Xoverwritten with various forms of the add, freshen, and update Xcommands. X.BS "Advanced features and commands X.IX "advanced concepts X.H 1 "Other concepts X.H 2 "Packing the archive and deleted files X.P X.IX "packing archives XWhen a file in an archive is replaced by a newer version of the file, or Xanother file by the same name, the old version is marked "deleted," but Xis still in the archive. X.DS X.IX "d option, list deleted files XYou can see deleted files by: X.ti +.5i X.CW "zoo ld arch X.DE Xwhich will list the contents of arch.zoo including deleted files. \*z Xhas a number of commands and option which allow you to extract deleted Xfiles. The better way to access old versions is to use "generations," Xdiscussed in the following section. X.P XThe deleted files make the archive larger, and therefore should be Xremoved when you are sure you no longer need them. Since packing the Xarchive takes time, you may want to perform all of the add and delete Xcommands on an archive, then pack it. X.P X.IX "deleted files, novice packing XWhen using the novice commands the archive is packed after every Xoperation which produces deleted files. The old archive with the deleted Xfiles is saved as file.bak. The backup name is formed by deleting the Xlast (rightmost) portion of the name and adding .bak. This means that X"myfile.zoo" would have a backup called "myfile.bak", and "my.test.file" Xwould have a backup names "my.test.bak". Obviously systems which only Xallow one '.' in a name don't have all of the forms. X.P X.IX "P command, pack archive X.IX "P option, pack after executing command XWhile the novice commands pack the file automatically, the expert Xcommands allow you to control when you will pack the archive. This is Xdone by the 'P' command, or the 'P' option to most other commands which Xmay delete files. X.DS XExample - add files and pack: X.ti +.5i X.CW "zoo aP arch file1 file2 X.sp XExample - delete files and pack: X.ti +.5i X.CW "zoo dP arch part1.old X.sp XExample - update archive and pack: X.ti +.5i X.CW "zoo aunP arch mystuff.* X.br Xor, since the novice commands pack every time X.ti +.5i X.CW "zoo -update arch mystuff.* X.DE X.H 2 "Generations X.P X.IX "generations XThere are times when you might want to save an old version of a file, Xeven though you are working with a newer version. This allows you to X"fall back" if you find a problem. Rather than using the term 'version,' X.IX "VMS X\*z uses the VMS term 'generations.' Normally only one generation of a Xfile is saved in an archive. X.P X.IX "generations, enabling X.IX "+ option, enable generations XTo allow generations to be used with an archive, first they must be Xenabled for the archive. This is usually done when the archive is Xcreated, by adding the option '+' to the 'a' command. To determine how Xmany generations are to be saved, the "generation limit" must be set. If Xyou want to save just the version of a file previous to the current Xversion, you can set the limit to one. If you want the last four Xversions, the generation limit should be four, etc. X.P X.IX "generation limit setting XThe limit may be set using one of two methods, or both if needed. The Xfirst is to set the limit on the entire archive. For instance, if you Xset the archive limit to three, the current version and two most recent Xversions of each file will be saved. X.DS X.nf XCreate the file with generations enabled: X.ti +.5i X.CW "zoo a+ arch file1 file2 X.sp XSet the limit for the archive to three: X.ti +.5i X.CW "zoo glA=3 arch X.DE XNow every time you save a file, up to two previous versions will be Xsaved. If there are already three versions saved, the oldest version Xwill be deleted. Look at the listing of a archive which has multiple Xversions saved. X.DS X.nf XSample of an archive with generations: X.sp X.in +.5i X.CW XArchive FIZ.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 3849 43% 2211 3 Feb 88 21:55:56 fiz.1;1 X 29 0% 29 2 Sep 88 17:31:16 xxx;2 X 29 0% 29 2 Sep 88 17:32:06 xxx;3 X 29 0% 29 2 Sep 88 17:32:42 xxx;4 X-------- --- -------- --------- -------- X 3936 42% 2298 4 files X------------ XThere is 1 deleted file. X.CE X.DE X.P XNote that there are three different version of the file "xxx" in the Xarchive. Also note that there is one deleted file. This happens to be Xthe first version of "xxx" which was deleted when version four was Xadded. X.P X.IX "generations, listing XNow, what if you want generations on just one file, or different limits Xon some files? In that case you can set a limit on any file or group of Xfiles which will override the limit set on the archive. You may also Xdisplay the limit using the 'g' option for list. X.P XHere's an example based on the previous archive. What you see is the Xlist with generation information, the command to change it, adding a new Xfile, and the listing after the file has been added. X.DS X.nf X.in +1i X.ti -1i XAdd the next file X.ti -.5i X.CW Xzoo a FIZ fiz.1 XZoo: fiz.1 -- (43%) added X.CE X.sp X.ti -1i XReset the generation limit for that file X.ti -.5i X.CW Xzoo gl=1 FIZ fiz.1 XZoo: fiz.1;1 -- adjusted to 1 X.ti -.5i Xzoo Ldg FIZ X.sp XArchive FIZ.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 29 0% 29 2 Sep 88 17:32:42 0g D xxx;1 X 29 0% 29 2 Sep 88 17:47:14 0g xxx;2 X 29 0% 29 2 Sep 88 17:47:22 0g xxx;3 X 29 0% 29 2 Sep 88 17:47:30 0g xxx;4 X 3849 43% 2211 3 Feb 88 21:55:56 1g fiz.1;1 X-------- --- -------- --------- -------- X 3965 41% 2327 5 files X------------ XD: deleted file. XArchive generation limit is 3. X.CE X.DE X.P XLooking at the listing, note that the generation information says the Xarchive limit is three. Since the limit on the file "xxx" is zero, the Xarchive default is used. Since the limit on file "fiz.1" is one, there Xshould be only one version of the file kept. Let's test this. X.DS X.nf X.in +1i X.ti -1i XAdd the file twice more and view X.CW Xzoo a FIZ fiz.1 XZoo: fiz.1 -- (43%) replaced+ X.sp Xzoo a FIZ fiz.1 XZoo: fiz.1 -- (43%) replaced+ X.sp Xzoo Ldg FIZ X.sp XArchive FIZ.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 29 0% 29 2 Sep 88 17:32:42 0g D xxx;1 X 29 0% 29 2 Sep 88 17:47:14 0g xxx;2 X 29 0% 29 2 Sep 88 17:47:22 0g xxx;3 X 29 0% 29 2 Sep 88 17:47:30 0g xxx;4 X 3849 43% 2211 3 Feb 88 21:55:56 1g D fiz.1;1 X 3849 43% 2211 3 Feb 88 21:55:56 1g D fiz.1;2 X 3849 43% 2211 3 Feb 88 21:55:56 1g fiz.1;3 X-------- --- -------- --------- -------- X 11663 42% 6749 7 files X------------ XD: deleted file. XArchive generation limit is 3. X.CE X.DE X.P XAfter adding the file several time, note that all generations other than Xthe most recent have been deleted. This is just what we wanted. XObviously if you wanted to keep a large number of generations of one Xfile you could set the archive limit higher and lower the limit of other Xfiles. This is useful, if not convenient. X.H 2 "Directory structures X.P X.IX "using subdirectories X.IX "subdirectories XMost operating systems have a multi-level structure of directories, and Xwhat are known as "subdirectories". \*z offers options about using these Xon the add command and the extract command. Normally any directory Xinformation you specify is preserved and available for use when the Xfiles are extracted. By default directory information is saved when a Xfile is added, but not used when it is extracted. These defaults seem to Xrepresent the most common cases. X.H 2 "Matching of filenames X.P X.IX "subdirectories and wildcards X.IX "wildcards and subdirectories XWhen \*z examines the filenames on the command line, an unintuitive name Xmatching paradigm is used. If the name contains a path delimiter, such X.IX "UNIX X.IX "MS-DOS Xas '/' in UNIX or '\\' in MS-DOS, only the name as entered is matched. X.DS X.nf XFor example: X.ti +.5i X.CW "zoo D arch src/subz.c X.DE XWill require an exact match before the file is deleted. However, if you Xjust specify a filename without a path delimiter, \fIall\fR files of Xthat name will be deleted, in any directory. X.DS X.nf XConsider this archive: X.sp X.CW XArchive FIZ.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 3849 43% 2211 3 Feb 88 21:55:56 fiz.1 X 6864 48% 3563 3 Feb 88 21:52:16 fiz.c X 3849 43% 2211 6 Sep 88 09:33:54 t1/fiz.1 X-------- --- -------- --------- -------- X 14562 45% 7985 3 files X.CE X.DE X.P X.IX "subdirectory name matching limitations XThere are two files, with different dates, named "fiz.1" and "t1/fiz.1". If Xyou use the delete command on "t1/fiz.1", only that file will be Xdeleted. If, however, you use the delete command with the name "fiz.1", Xboth files of that name will be deleted. Currently there is no way to Xdelete just the file with no path information. This limitation also Xapplies to other commands which require specifying names in the archive, Xsuch as list and extract. X.H 2 "Comments X.P X.IX "comments X\*z provides two type of comments, one on files to explain what each Xfile does, and one on the archive as a whole to explain what's in the Xarchive. The comment on the entire archive might be something like X"analize heat test data," while individual files might have comments Xlike "validate data routine," and "plot graphs on printer in graphics Xmode." The actual commands used to do this are discussed under adding Xand listing data sections. X.H 1 "Advanced command usage X.H 2 "adding data to an archive X.H 3 "Move updated files to an archive X.P X.IX "combining update and move X.IX "update and move, combining X.IX "move, combining and update XWhile the novice commands support the most common operations, there are Xseveral things which can only be done by the expert commands. One of Xthese is to update an archive and delete the added files. This is a Xcombination of the -update and -move commands. X.DS XThe expert command to do this is: X.ti +.5i X.CW "zoo aunM arch file1 file2 X.DE X.P XNote that this is a combination of options, 'u' to update files which Xare newer than what's in the archive, 'n' for new files not in the Xarchive at all, and 'M' to move the added files to the archive. Files Xwhich are current in the archive will not be replaced, saving time (and Xif packing is not done, file space). X.H 3 "Packing as an option to add X.IX "packing while adding files X.IX "adding files and packing XNote that because this is an expert command, the archive is not packed, Xand any files replaced will still be in the archive. Adding the 'P' Xoption to the command causes the archive to be packed, and the unpacked Xarchive to be saved as 'file.bak'. X.DS XFor example: X.ti +.5i X.CW "zoo aunMP arch file1 file2 X.DE Xwill pack the archive "arch.zoo" and leave the unpacked version as X"arch.bak". X.H 3 "Adding files from subdirectories X.P X.IX "adding files from subdirectories X.IX "subdirectories X.IX "subdirectories, adding files from XWhen files are in subdirectories, one thing you can do is to have a Xseparate archive for each subdirectory. Using \*z you may also have Xfiles from several subdirectories in anarchive. The following examples X.IX "MS-DOS X.IX "UNIX Xshown how this is done using MS-DOS or UNIX. X.DS X.nf XMS-DOS: X.ti +.5i X.CW "zoo a src\\\\* doc\\\\* X.sp XUNIX: X.ti +.5i X.CW "zoo a src/* doc/* X.DE XNote that the only difference is that the '\\' delimiter is used in XMS-DOS instead of the more common '/' used in UNIX. When you list an Xarchive created this way, the listing looks like this. X.DS X.nf XSubdirectory archive listing X.sp X.in +.5i X.CW XArchive FIZsdir.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 3849 43% 2211 2 Sep 88 14:29:02 doc/fiz.1 X 6864 48% 3563 2 Sep 88 14:29:02 src/fiz.c X-------- --- -------- --------- -------- X 10713 46% 5774 2 files X.CE X.DE X.IX "subdirectory, extracting files from X.IX "extracting files from subdirectories XThere are a number of options for extracting these files, allowing you to Xuse or ignore the subdirectory information. If you want to create the Xarchive file without the directory names saved as part of the filename, Xthe ':' option will allow you to do this. One reason to do this is if Xyou are going to create an archive from a subdirectory and don't want to Xhave to change to the directory, or if you know the files will be Xextracted in another directory. X.DS X.nf XCreating an archive from a subdirectory: X.ti +.5i X.CW "zoo a: arch src/* src/* X.sp XGives listing: X.sp X.in +.5i X.CW XArchive FIZsdir.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 3849 43% 2211 2 Sep 88 14:29:02 fiz.1 X 6864 48% 3563 2 Sep 88 14:29:02 fiz.c X-------- --- -------- --------- -------- X 10713 46% 5774 2 files X.CE X.DE X.H 3 "Getting the list of files from another source X.P X.IX "adding lists of files X.IX "standard input, reading filenames from X.IX "filesnames, reading from standard input XIf you're storing a large number of files in an archive, it may be Xinconvenient to type in the names of the files each time you work on the Xarchive. \*z allows you to take the files list from a file using the 'I' Xoption. This option may be applied to a number of commands, but Xtypically you use it with the 'a' command when creating a new archive, Xor the 'aun' command when updating an archive. X.DS X.nf XExample of file list for a file X.in +.5i X.CW "zoo aI arch < files.lst X.DE XWhere the file "files.lst" has been created with a list of the files Xyou're maintaining in this archive. Since this is a simple text file, Xyou can create it with an editor, and program, or by typing it in. X.P XIf you are on a system which supports pipes between commands, you can Xuse a program to generate a list and send it into \*z without saving it Xin a file. The commands "find" on UNIX and "scan" on MS-DOS are useful. X.DS X.IX "UNIX X.IX "MS-DOS X.nf X.in +.5i X.ti -.5i XFile list by pipes - UNIX: X.sp X.CW "find . -type f -mtime -4 -print | zoo aI thisweek X.sp X.ti -.5i XFile list by pipes - MS-DOS: X.sp X.CW "scan -R *.doc | zoo aI thisweek X.DE X.H 3 "Adding comments to the archive X.P X.IX "comments, adding XComments may be the entire archive or on individual files, or both. The Xconcept is discussed in detail in the "Other Concepts" section. Comments Xmay be added to a file at the time the file is added to the archive. XThis is done by the 'c' option. Here is an example of adding data to and Xarchive with a comment on each file, then adding a comment to the Xarchive as a whole. X.DS X.nf X.in +.5i X.CW Xzoo ac htanal *.for X.sp XZoo: main.for -- ( 0%) added X[Enter comment for main.for then type /END] XRead four heat treat test results files and prepare a graph on the Xdot matrix printer. X/end XZoo: plot.for -- ( 0%) added X[Enter comment for plot.for then type /END] XConvert X,Y data to plot points in 240dpi mode X/end XZoo: screen.for -- ( 0%) added X[Enter comment for screen.for then type /END] XFORTRAN version of curses, handle screen display and buffering. X/end XZoo: strings.for -- ( 0%) added X[Enter comment for strings.for then type /END] XString manipulation package X/end X.sp 2 Xzoo cA htanal X.sp X[Enter archive comment for htanal.zoo then type /END] XHeat treat analysis program, prepare plot of results on the dot Xmatrix printer X/end X.CE X.DE X.P XThe first command adds all of the FORTRAN files to the archive, each Xwith a comment. A comment is then added to the entire archive which Xdescribes the function of the package. If you want to modify the Xcomments already in the archive, either file or archive, you may use the X'c' or 'cA' commands. The old comment will be listed, and you may either Xtype a new comment or just press RETURN to keep the existing comment. X.H 3 "Using generations X.P X.IX "generations XGenerations are really useful as a way to keep back versions of Xfiles handy in case you have to roll back, or fix a bug in an older Xversion. Here's how it works. X.P X.IX "generation limit XThere is a limit on the number of generations of a file which will be Xkept, set on each individual file, and by default zero. This doesn't Xmean that no generations are saved, it means that there's no limit. XThere's also a limit on the whole archive, called the archive limit, and Xthat's set by default to one. The maximum number of generations saved is Xthe lower of the two limits for any given file. X.P XThere are three ways to set up an archive with generations. The simplest Xis to leave the file limits at the default (zero) and set the archive Xlimit. What you do is to create an archive using the 'a+' command to add Xfiles and turn on generations. Then you use the 'glA=' command to set Xthe limit on generations for the whole archive. X.DS XIt's easier than it sounds, here's an example: X.sp X.nf X.in +.5i X.CW Xzoo a+ demo foo1 XZoo: foo1 -- (67%) added X.sp Xzoo glA=3 demo XArchive generation limit is now 3 X.CE X.P X.fi X.ft R XNow we have an archive with one generation of files, and no more than Xthree generations of files to be saved for any file. After changing the Xfile and adding new versions to the archive, here's what the archive Xlooks like. Notice that deleted files haven't been removed, to make it Xeasy to see what's happening. X.sp 2 X.nf X.CW Xzoo Ldg demo X.sp XArchive demo.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 5074 67% 1690 18 Oct 88 10:36:52 0g D foo1;1 X 5103 67% 1705 18 Oct 88 10:45:10 0g foo1;2 X 5132 67% 1715 18 Oct 88 10:45:14 0g foo1;3 X 5161 67% 1725 18 Oct 88 10:45:20 0g foo1;4 X-------- --- -------- --------- -------- X 20470 67% 6835 4 files X------------ XD: deleted file. XArchive generation limit is 3. X.CE X.DE X.P XRemember that there are three ways to use generations. The second is if XI have one file which does not require many generations. In that case I Xwould set the archive generation limit to the value for all the rest of Xthe files in the archive, and then set the limit on the one file which Xneeds a special value. X.DS XIt would look like this: X.nf X.in +.5i X.CW Xzoo a+ demo foo1 foo2 foo3 XZoo: foo1 -- (67%) added XZoo: foo2 -- (21%) added XZoo: foo3 -- (77%) added X.sp Xzoo glA=5 demo XArchive generation limit is now 5 X.sp Xzoo gl=2 demo foo2 XZoo: foo2;1 -- adjusted to 2 X.CE X.DE X.P XThe final way to manage generations is to set the archive limit to zero, Xallowing any number of versions as default, and then setting the limit Xon each file individually. This is almost never needed, but it does Xallow you to control the generation limit of each file completely. X.H 2 "Listing the archive X.H 3 "Generation information X.P X.IX "generations, listing X.IX "listing generations XThere are several options which will help you work with generations. The Xsimplist is to use the 'L' command instead of the 'l'. Here is a simple Xarchive, listed in two ways. X.DS X.nf XListed with 'l': X.sp X.in +.5i X.CW XArchive FIZ.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 6864 48% 3563 3 Feb 88 21:52:16 fiz.c;1 X 29 0% 29 31 Aug 88 16:29:04 xxx;2 X-------- --- -------- --------- -------- X 6893 48% 3592 2 files X.CE X.DE X.DS X.nf XListed with 'L': X.sp X.in +.5i X.CW XArchive FIZ.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 6864 48% 3563 3 Feb 88 21:52:16 fiz.c;1 X 29 0% 29 31 Aug 88 16:29:04 xxx;1 X 29 0% 29 31 Aug 88 16:29:04 xxx;2 X-------- --- -------- --------- -------- X 6922 48% 3621 3 files X.CE X.DE X.P X.IX "L command, list all generations XNote that using 'l' only the most current version is displayed, while Xif you use 'L' all non-deleted versions are listed. X.P X.IX "g option, list generation limits X.IX "generation limits, listing XIf you set limits on generations of individual files, then you will Xwant to see those limits. The option to do this is 'g', display Xgeneration info. Without that option the archive and file generation Xlimits will not be displayed, although the 'L' command will display Xundeleted versions. X.DS X.nf XAn archive with generations, using 'L': X.sp X.in +.5i X.CW XArchive FIZ.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 6864 48% 3563 3 Feb 88 21:52:16 fiz.c;1 X 29 0% 29 31 Aug 88 16:29:04 xxx;1 X 29 0% 29 31 Aug 88 16:29:04 xxx;2 X-------- --- -------- --------- -------- X 6922 48% 3621 3 files X.CE X.DE X.DS X.nf XAn archive with generations, using 'Lg': X.sp X.in +.5i X.CW XArchive FIZ.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 6864 48% 3563 3 Feb 88 21:52:16 0g fiz.c;1 X 29 0% 29 31 Aug 88 16:29:04 0g xxx;1 X 29 0% 29 31 Aug 88 16:29:04 0g xxx;2 X-------- --- -------- --------- -------- X 6922 48% 3621 3 files X------------ XArchive generation limit is 3. X.CE X.DE X.H 3 "Listing deleted files X.P X.IX "listing deleted files X.IX "deleted files, listing X.IX "d option, listing deleted files XIf you have modified an archive with the expert commands, and have not Xyet packed the archive to remove deleted files, you may view those files Xusing the 'd' option to the 'l' or 'L' commands. X.DS X.nf XThis is what the listing looks like with 'L': X.sp X.in +.5i X.CW XArchive FIZsim.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 6864 48% 3563 3 Feb 88 21:52:16 fiz.c X 3849 43% 2211 3 Feb 88 21:55:56 fiz.1 X-------- --- -------- --------- -------- X 10713 46% 5774 2 files X------------ XThere is 1 deleted file. X.CE X.DE X.DS X.nf XAnd this listing used 'Ld': X.sp X.in +.5i X.CW XArchive FIZsim.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 3849 43% 2211 3 Feb 88 21:55:56 D fiz.1 X 6864 48% 3563 3 Feb 88 21:52:16 fiz.c X 3849 43% 2211 3 Feb 88 21:55:56 fiz.1 X-------- --- -------- --------- -------- X 14562 45% 7985 3 files X------------ XD: deleted file. X.CE X.DE X.P XNote that the listing without the 'd' option simply informs you of the Xnumber of selected files, while the listing with 'd' shows you the file Xinformation just as it does the undeleted files. X.H 3 "Listing multiple archives X.P X.IX "listing multiple archives X.IX "L command, listing multiple archives X.IX "multiple archives, listing XThe command 'L' allows more than one archive to be listed. In fact the Xgeneral form allows for any number of archives to be specified, each Xaffected by the options of the 'L' command. The restriction is that you Xcan't just list some files, you get a listing of all undeleted files in Xall archives. X.DS X.nf XCommand "zoo L FIZ FIZsim": X.sp X.in +.5i X.CW XArchive FIZ.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 6864 48% 3563 3 Feb 88 21:52:16 fiz.c;1 X 29 0% 29 31 Aug 88 16:29:04 xxx;1 X 29 0% 29 31 Aug 88 16:29:04 xxx;2 X-------- --- -------- --------- -------- X 6922 48% 3621 3 files X.sp XArchive FIZsim.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 6864 48% 3563 3 Feb 88 21:52:16 fiz.c X 3849 43% 2211 3 Feb 88 21:55:56 fiz.1 X-------- --- -------- --------- -------- X 10713 46% 5774 2 files X------------ XThere is 1 deleted file. X.CE X.DE X.H 3 "Creating a simple archive database file X.P X.IX "creating archive content listings X.IX "content listsings, creating X.IX "database input files, creating XThe 'a' and 'q' options may be used to create a database file which may Xbe used as input to your favorite database program, or just sorted and Xviewed on the screen or paper. X.DS X.nf XCreating a simple files list from several archives: X.sp X.CW X.ti +.5i Xzoo Laq FIZ FIZsim X.sp X.in +.5i X 6864 48% 3563 3 Feb 88 21:52:16 FIZ.zoo fiz.c;1 X 29 0% 29 31 Aug 88 16:29:04 FIZ.zoo xxx;1 X 29 0% 29 31 Aug 88 16:29:04 FIZ.zoo xxx;2 X 6864 48% 3563 3 Feb 88 21:52:16 FIZsim.zoo fiz.c X 3849 43% 2211 3 Feb 88 21:55:56 FIZsim.zoo fiz.1 X.CE X.DE Xthe 'a' option causes the name of the archive to be listed on each line, Xinstead at the start of the listing. The 'q' option suppresses the Xheadings and summaries, leaving just one line per file. X.P XThe eighth field is the archive name, and the ninth is the file name. XThe file may be sorted on either of those, or the size, date modified, Xetc. Any or all of those fields may be used a indices for a real Xdatabase program, if the number of files and archives is large enough to Xwarrant that. X.H 3 "Listing comments X.P X.IX "listing comments X.IX "comments, listing XAn archive is normally listed using the 'l' command, and only the actual Xcontents are shown. If the 'v' option is added, or if 'v' is used as a Xcommand, the comment at the start of the archive which describes the Xpackage as a whole is displayed. If the 'V' option or command is used, Xthe comments on individual files are shown as well. Here are examples of Xlisting an archive, first with just the descriptive archive comment, and Xthen with the comments on the individual files as well. X.sp X.DS X.nf X.CW X.in +.5i Xzoo v htanal X.sp XArchive htanal.zoo: X>> Heat treat analysis program, prepare plot of results XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 29 0% 29 17 Oct 88 17:23:24 C main.for X 29 0% 29 17 Oct 88 17:23:24 C plot.for X 29 0% 29 17 Oct 88 17:23:24 C screen.for X 29 0% 29 17 Oct 88 17:23:24 C strings.for X-------- --- -------- --------- -------- X 116 0% 116 4 files X------------ XC: file has attached comment. X.CE X.DE X.sp 2 X.DS X.nf X.CW X.in +.5i Xzoo V htanal X.sp XArchive htanal.zoo: X>> Heat treat analysis program, prepare plot of results XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 29 0% 29 17 Oct 88 17:23:24 C main.for X |Read four heat treat test results files and prepare a graph on the X |dot matrix printer. X 29 0% 29 17 Oct 88 17:23:24 C plot.for X |Convert X,Y data to plot points in 240dpi mode X 29 0% 29 17 Oct 88 17:23:24 C screen.for X |FORTRAN version of curses, handle screen display and buffering. X 29 0% 29 17 Oct 88 17:23:24 C strings.for X |String manipulation package X-------- --- -------- --------- -------- X 116 0% 116 4 files X------------ X.CE X.DE X.H 2 "Extracting files X.H 3 "Extracting to a subdirectory X.P X.IX "extracting to a subdirectory X.IX "subdirectory, extracting to X.IX "/ option, extract to subdirectory XSince the \*z default is to save directory information, you may want to Xuse that information at some time. The default is to extract all files Xinto the current directory. If the option '/' is added to the expert Xextract command, the files will be extracted into their original Xdirectories, \fIif and only if the directories exist\fR. If you want to Xcreate the directories, the '//' option will do that, creating any Xneeded directories as the files are extracted. X.DS X.nf XConsider the archive: X.sp X.in +.5i X.CW XArchive myarch.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 3849 43% 2211 2 Sep 88 14:29:02 doc/fiz.1 X 6864 48% 3563 2 Sep 88 14:29:02 src/fiz.c X-------- --- -------- --------- -------- X 10713 46% 5774 2 files X.CE X.sp X.ti -.5i XAnd the command: X.CW zoo x myarch X.DE X.P XThe files "fiz.1" and "fiz.c" will be extracteded in the current directory. XTo extract the files in their original directories, the option '//' may Xbe used. X.DS X.nf XCreating directories and extracting: X.sp X.in +.5i X.CW "zoo x// myarch X.DE X.P XFinally the '/' option extractes files into their original directories if Xthe directories exist. In the case where some directories exist and Xothers don't only the files for which you have directories will be Xextracted, and you will get a warning for each file not restored. X.H 3 "Extracting quietly X.P X.IX "q command, quiet operation X.IX "quiet extract XThe 'q' command may be used with the 'x' command to extract files Xwithout a message for each file. Although most people want a message to Xassure them that the file was extracted, this may be useful if the Xextract affects a number of files and only the error messages (if any) Xare needed. X.H 3 "Using wildcards for extract X.P X.IX "extract using wildcards X.IX "wildcards, extract using XIn general wildcards may be used to extract files as well as save them. XHowever, on some systems where wildcard names are expanded before the Xcommand is executed, it will be necessary to use the correct escape Xsequence to prevent the name from being changed. X.DS X.IX "UNIX X.IX "MS-DOS X.nf XExtract on MS-DOS X.sp X.ti +.5i X.CW "zoo x arch *.doc X.sp XExtract on UNIX X.sp X.ti +.5i X.CW "zoo x arch "*.doc" X.DE XSince the UNIX system expands the wildcard names for you, zoo is a Xspecial case, and you must quote the name. Quoting is not needed on XMS-DOS and VMS. X.H 3 "Extracting deleted files X.P XAlthough careful use of generations will avoid the need to recover the Xdeleted versions of files, you may at some time have an archive which Xcontains a deleted file, and wish to recover it. Consider the archive Xbelow. X.DS X.nf XAn archive with a deleted file: X.sp X.in +.5i X.CW Xzoo ld FIZ X.sp XArchive FIZ.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 3849 43% 2211 3 Feb 88 21:55:56 fiz.1 X 6864 48% 3563 3 Feb 88 16:21:36 D fiz.c X 6864 48% 3563 3 Feb 88 21:52:16 fiz.c X 3849 43% 2211 6 Sep 88 09:33:54 t1/fiz.1 X-------- --- -------- --------- -------- X 21426 46% 11548 4 files X------------ XD: deleted file. X.CE X.DE X.P XTo make the situation worse, there is also an undeleted file by the same Xname. What you need to do is to recover the the older version of the Xfile which has been deleted. Note that if you had used the novice Xversion of the add command it would have packed the archive and the Xdeleted file would be gone. I could be found in the "FIZ.bak" copy of Xthe archive, however. X.P X.IX "extracting deleted files X.IX "d option, extracting deleted files XThe extract command may be used with the 'd' option, which allows \*z to Xextract deleted files as well as active files, or the 'dd' option, which Xforces extraction of \fIonly\fR deleted files. Since you have an active Xfile of the same name, you will want the 'dd' option. Don't forget to Xdelete whatever version of the file is in your current directory, or you Xwill need to use still more options. X.DS X.nf XExtracting the deleted file: X.sp X.in +.5i X.CW Xzoo xdd FIZ fiz.c XZoo: fiz.c -- extracted X.CE X.DE XThe message indicates that the deleted version of the file has been Xrecovered. Note that the generations feature is intended to eliminate Xthe need to do this type of operation. X.ne 8 X.H 3 "Extract and overwrite X.ce X"You are lost in a twisty maze of options, all alike" X.P X.IX "extracting with overwrite X.IX "overwrite files on extract X.IX "O option, overwrite existing files XThere are three options which allow you to extract files from an archive Xwithout deleting all of the files in your current directory structure. XThese are generally useful only when the existing file have become Xdamaged in some way, such as trying to make changes to source or Xdocumentation with a new editor, etc. X.P XThe 'O' option allows \*z to overwrite existing files. Without this Xoption \*z will ask permission to overwrite an existing file before Xreplacing it. While this is useful as a safety measure, there are times Xwhen you will want to "just do it." When the 'O' option is specified, Xexisting file will be replaced unless they are newer than the file in Xthe archive or read-only. Using the option "OO" instead of 'O' allows X\*z to overwrite "read-only" files. If you want to replace existing Xfiles you must use one of these two options. X.P X.IX "extracting read-only files X.IX "read-only files, extracting X.IX "S option, overwrite read-only files X.IX "overwriting newer files on extract XEven when using the 'O' option, an existing file will not be overwritten Xif it is newer than the version in the archive. This would happen if you Xextracted a file, changed it, and then found that the changes were Xincorrect. To allow \*z to replace a newer files, you need the option X'S', which specifies that a superseded file will be extracted. The X'SOO" combination of options will cause \*z to extract any file Xspecified unconditionally. X.H 3 "Extracting generations X.P X.IX "generations, extracting X.IX "extracting generations XIf you have an archive with previous generations, at some time you will Xwant to extract a generation older than the most current. To do this Xyou specify the generation number as part of the filename in the 'x' Xcommand. X.DS XLet's look at the listing of an archive with generations, and then the Xcommand to extract an old generation: X.sp X.nf X.CW X.in +.5i Xzoo Ldg demo X.sp XArchive demo.zoo: XLength CF Size Now Date Time X-------- --- -------- --------- -------- X 5074 67% 1690 18 Oct 88 10:36:52 0g D foo1;1 X 5103 67% 1705 18 Oct 88 10:45:10 0g foo1;2 X 5132 67% 1715 18 Oct 88 10:45:14 0g foo1;3 X 5161 67% 1725 18 Oct 88 10:45:20 0g foo1;4 X-------- --- -------- --------- -------- X 20470 67% 6835 4 files X------------ XD: deleted file. XArchive generation limit is 3. X.sp 2 Xzoo x demo foo1;2 XZoo: foo1;2 -- extracted X.CE X.DE X.P X.IX "generation delimiters XNotice that the characters ';' or ':' may be used to separate the Xfilename from the generation. The ';' is customary in VMS, while it's Xinconvenient in UNIX, where the ':' may be used. At this time there's no Xway to bypass the generation character and access a file with either Xcharacter in its name. X.OP X.ls 1 X.H 1 Index X.so uguide.idx X.de PX \" no offset on these X.. X.TC SHAR_EOF fi exit 0 # End of shell archive