ART and TARTOOLS ART is an interactive program which manipulates archives in a format compatible with the Unix `tar' program. TARTOOLS are individual programs, each of which implements one of the major functions of ART. The tools are: CREATAR LISTAR EXTRACTAR CMPTAR APPENTAR UPDATAR RMTAR MVTAR The tools create multi-volume archives with volume labels. Each volume of a multi-volume archive is (normally) separately readable by all known versions of Unix "tar." Volume changes will be requested when an archive reaches a specified size, when a write error occurs on the archive, or may be requested by the user interactively. FEATURES * interactive operation The tools will respond to a QUIT signal from the keyboard with an interactive prompt. All command line options may be set or changed from the interactive prompt, and processing continued. Brief interactive ` help' is available from the prompt. The tools will respond to an INTERRUPT signal with a "block report" describing the file which is currently in process, and its location in the archive. Processing continues. * multi-volume support Multi-volume archives may be created based upon maximum desired volume size, device write error, interactive command, or dividers in the argument list. If maximum volume size is known, the tools will normally avoid splitting files across volume boundaries, so that each volume is (separately) a valid `tar' file, readable by any tar. Regular file archives are automatically assigned sequential volume numbers. * archive labels Each volume of a TARTOOLS archive begins (by default) with a volume label which records volume number, archive creation time, name of the archive creator, maximum volume size, name of the host on which the archive was created, the blocksize with which the archive was created, a unique id which may be used to identify the archive, and a user-specifiable label string. An update label will be added to the archive on append (which serves to record modification time of the archive). These labels will be extracted as directories by traditional Unix tars or ignored with a complaint about unrecognized header types by Posix tars. GNU tar does both. * multi-fileset support Multiple archives on a single tape volume may be managed, either from the command line or from the interactive prompt. It is possible to skip archives (forward or backward on capable devices) and to process a range of archives on read. Tape files which are not recognized as tar format files are automatically skipped on read, so it is possible to mix tar and `dump' (or other) format archives on the same tape. * file selection by time, regular expression pattern, file size, file type, and/or sequence number in the archive, as well as normal filename selection with optional pattern matching. * `intelligent' file skipping When reading archives, the tools attempt to intuit the "type" of an archive in order to use fast methods of skipping unused data (seeking or mag tape ioctls) rather than reading and discarding it. This can dramatically increase the speed of listing on some archives, and reduce considerably unnecessary overhead on cpu and data buses. * rabid output options TARTOOLS maintain fairly extensive information about what they have done so far and what they are doing now. In addition to the usual terse and verbose `tar' output formats, TARTOOLS will optionally report "internal" information such as block/record numbers of the location of headers and beginning and ending blocks/records of file data, as well as header type, header sequence number in the archive, volume number, etc. This information can be useful in examining or `debugging' possibly defective archives. Brief reports of matched/unmatched names in the argument or file lists may also be generated. When labeled archives are used, labels are printed in a convenient format when encountered. Identifying information retained in the labels may also be included in file list output, which is convenient for producing quick-search indexes. The `block report' available from INTERRUPT is normally printed at program exit, providing sometimes interesting statistics about the archive. If the tools are compiled for INTERACTIVE_DEBUG_CMDS, an undocumented command is available from the interactive prompt to report internal state in excruciating detail. * pathname processing The tools canonicalize pathnames, strip trailing (and leading) slashes, and optionally strip unwanted leading components of pathnames. This permits considerable flexibility, especially when extracting archives, to put things where you want them. As an example, you can strip all but the last component of pathnames, so that extracted files wind up in your current directory. Slash-stripping occurs on reading as well as writing; unless specifically requested, files will never be added to an archive with leading slashes intact, but if an archive is encountered which contains absolute pathnames, the leading slash will be stripped (by default) on extract. * archive/filesystem comparison The results of comparing files in an archive to files in the filesystem can be: o reported o used to update the archive o used to remove from the filesystem all selected files which are already safely in the archive It is possible to report the comparison for all archive files, or only those which do (or don't) compare identical to their filesystem counterparts. Comparison output may optionally include stats for either or both versions of the file. The default `quick' comparison, which checks such things as size and modification time, may be supplemented by a full byte-by-byte comparison for regular files. * file/archive compression TARTOOLS will process regular file archives using gzip, bzip2, or compress, provided those programs are found on the system at compile time. It is possible to compress (uncompress) an entire archive or to compress each file as it is added to (extracted from) the archive (or both!). The tools recognize the appropriate filename extensions and automatically engage the corresponding mode if found (archive compression only). Alternatively, option flags may be used to force a desired mode. Archive compression to device archives is not supported (although, of course, file compression to device archives is available). * remote archive support On systems which have /etc/rmt a slightly modified version of the `rmtlib' package by Fred Fish and Arnold Robbins may be used to provide access to tape and/or regular file archives on remote machines on the network. The Tools The individual tools are intended to be somewhat simpler to use, with fewer opportunities for error, than the multipurpose ART program (which is more nearly equivalent to tar). Defaults, defaults files, and environment variables help to make normal use simple and robust. Common mistakes, such as typing $ tar cf /dev/rmt8 when you meant to type $ tar tf /dev/rmt8 to list the archive (which is now possibly destroyed) are unlikely if you can type $ listar -f /dev/rmt8 since listar can't write the archive. The tools attempt to be convenient to use in as many ways as possible. Multi-volume regular files are automatically assigned filenames with sequential volume numbers. Alternately, the tools will read files split by the binary option of the Unix split command (or will create files named by the same convention). Compression filenames are recognized on read or create. For device archives, volume labels allow checking of sequence when new volumes (e.g. floppies) are inserted. Defaults files allow setting blocking factor or maximum volume size for a particular archive name or type. Etc. It should be noted that the default `simplicity' of the tools can be converted to as dangerous complexity as you wish, since there are dozens of command-line options, almost all of which may also be set or changed (with varying degrees of safety) interactively. COMPATIBILITY TARTOOLS take pains to achieve compatibility with Unix and Posix tar format archivers. The tools will read archives created by other archivers, including Version 7, BSD and System 5 Unix tars, GNU tar, pax, and star, so long as the generated archives do not include format extensions implemented in the more recent archivers. TARTOOLS do not attempt to handle feature extensions offered by some of those programs. Unix tars will read TARTOOLS archives with little problem. TARTOOLS volume label headers are arranged to appear as dummy directories to Unix tars, which will extract them as such. Posix-compatible archivers will also extract them, but will also likely complain of an unrecognized header type. TARTOOLS also uses some "special" header types to mark end-of-volume and end-of-archive, but arrange that `standard' tars are unlikely to encounter them. GNU tar and star handle end-of-archive in a manner consistent with Unix tar, and thus have no problem with TARTOOLS special headers. The current version of pax, however, is stricter than Unix tars when detecting end-of-archive. It will encounter the special end-of-archive record, try to skip past it, and thus will ask for a new volume when reading fails. There appears to be no way to disable this behavior in pax. It didn't used to do that...it does now. In a less serious vein, GNU tar sometimes produces regular file archives which have only one terminating (ZERO) record at the end. This is probably done to avoid padding the file with an entire block of data when only one additional record is required ( TARTOOLS simply write a short block when needed). When TARTOOLS encounter such an archive, they are led to expect a second volume, and complain bitterly when none is found. Not serious, but noisy. Where stricter compatibility with other archivers is required, TARTOOLS provide `compatibility' options to disable special headers, etc. See the manual page and "Using Tartools" for additional information. ------------------------------------------------------------------------ Duane H. Hesser dhh@virtual-cafe.com