Table of Contents


datar - archive individual files on DAT cartridge


datar [-]{caxXtirk}[vdoz] filename [arcname] [filename [arcname]...]

datar [-]{ca}[vd] filename [arcname] [filename [arcname]...]

datar [-]x[vdoz] arcname [filename] [arcname [filename]...]

datar [-]{Xtk}[vdz]

datar [-]{ir}[vd] index_file_name


datar manages archives of files stored on DAT cartridges. It keeps a table of contents on the tape to enable fast access time for any file in the archive. Unlike tar, datar is not useful for backing up directory structures. It is more useful for managing archives containing several large files such as ERP raw files.

When adding files to an archive, either with the -c or the -a command, the filename parameter specifies the pathname of a file on disk. The arcname parameter specifies the name to used to identify the file in the archive. The arcname parameter can be a maximum of 50 characters long. The arcname parameter must be present when using the -c or the -a command, unless the -d option is specified, in which case the disk file name is used as the archive file name.

Similarly, when extracting files from an archive with the -x command, the arcname parameter specifies the name in the archive of the file to extract, and the filename parameter specifies the name to use for the disk file which will be created. If the -d option is specified the disk file will have the same name as the archive file.

The filename parameter can be ’-’, in which case stdin is read from (when creating or adding files to an archive) or stdout is written to (when extracting a file from an archive). Note that when using stdin or stdout, only one file can be added to or extracted from the DAT at a time.


Exactly one of the letters c, a, x, X, t, i, r, and k must be specified. This letter can optionally be preceded with ’-’ as with most other UNIX commands. It can also be optionally followed with the letter ’v’ and/or ’d’ as described below. The command letters have the following meanings:

Create a new archive. Any existing data on the DAT is overwritten.
Append the named files to an existing datar tape.
Extract the named files from an archive into the current working directory.
Extract all files in the archive, using their archive names for their file names.
Print a table of contents of the archive to standard output. Included in the table of contents is the archive creation date, the number of files stored in the archive, the total archive size, and the names, sizes, and modification dates of all the files in the archive.
Create a file on disk which contains the index record at the end of the tape. This manuever can be used in conjunction with the r command described below for extreme cases in which the index record at the end of the tape has been corrupted.
"Repair" a datar tape which has no index record by copying an index file created with the -i option to the end of the tape.
k [n]
"Kill" (i.e. delete) the last [n] files in the archive. Default is 1.


This is the "verbose" option. When invoked, datar prints status messages to stderr. The messages generally describe datar’s activities such as "Opening DAT drive...", "Repositioning tape to index file...", etc.
The d option can be use when adding files to an archive with the c or a commands, or when extracting files from an archive with the x command. The default method for accessing files on a datar tape is to specify a name for identifying a file in an archive and to specify the pathname of the disk file to read from (when adding files to archives) or write to (when extracting files from archives). The d option directs datar to use the same name for the archive file as the disk file. This is very useful if one wants to use wild cards when specifying the files to add to an archive. For example,
datar -avd *
The z option is used when extracting files. It specifies whether or not any raw, uncompressed data files are to be compressed as they are extracted from the tape archive. If the file-to-be-compressed has a ’.raw’ extension attached, datar will change that extension to ’.crw’ when it writes the extracted file. Raw files with extensions other than ’.raw’ will not have their names changed, but will be compressed. The user will be notified if they asked to compress any already-compressed data files.
The o option is used only when extracting a list of files from an archive (the x option). It tells datar to obey the invoker’s command-line ordering of files exactly as supplied. Without this option, datar will extract the files in order of proximity to the start of the tape. This can substantially speed up retrieval times, but will rarely coincide with precise user order.


Ron Ohst

See Also


Table of Contents