tp(1)
NAME
tp − manipulate tape archive
SYNTAX
tp [ key ] [ name... ]
DESCRIPTION
The tp command saves and restores files to and from an archive on DECtape or magnetic tape. The default archive is tapx, but any file or device may be requested through the use of options. Its actions are controlled by the key argument. The key is a string of characters containing at most one function letter and possibly one or more function modifiers. Other arguments to the command are file or directory names specifying which files are to be dumped, restored, or listed. In all cases appearance of a directory name refers to the files and (recursively) subdirectories of that directory.
NOTE
The DECtape device is not supported in ULTRIX-32.
The function portion of the key is specified by one of the following letters:
d Deletes the named files from the tape. At least one name argument must be given. This function is not permitted on magnetic tapes.
r The named files are written on the tape. If files with the same names already exist, they are replaced. “Same” is determined by string comparison, so ./abc is not the same as /usr/dmr/abc even if /usr/dmr is the current directory. If no name argument is given, ‘.’ is the default.
t Lists the names of the specified files. If no name argument is given, the entire contents of the tape are listed.
u Updates the tape. u is like r, but a file is replaced only if its modification date is later than the date stored on the tape. u is the default function key if none is given.
x Extracts the named files from the tape to the file system. The owner and mode are restored. If no name argument is given, the entire contents of the tape are extracted.
You can use one or more of the following options in addition to the letter that selects the function desired.
c A fresh dump is to be created. The tape directory is cleared before beginning. This option is usable only with the r and u function keys. This option is assumed with magnetic tape since it is impossible to selectively overwrite magnetic tape.
f Use the next argument as the name of the archive. Any special file can be used as the next argument. When used with the r function key, the c option is implied. That is, the directory is cleared before beginning.
This option cannot be used with the
d or u function keys.
i Errors reading and writing the tape are noted, but no action is taken. Normally, errors cause a return to the command level.
m Specifies magnetic tape as opposed to DECtape. The default tape is rmt0h, but other devices may be requested with the f option.
When used with the
r function key, the c option is implied. That is, the directory is cleared before beginning.
This option cannot be used with the
d or u function keys.
v Normally, tp does its work silently. This option causes it to display the name of each file it treats, preceded by the function letter. With the t function, v gives more information about the entries than just the name.
w Causes tp to pause before transferring each file, type the indicative letter and the file name (as with v) and await the user’s response.
Response
y means ‘yes’, so the file is transferred. Null response means ‘no’, and the file is not transferred
Response
x means “exit”; the tp command terminates immediately. With the x function key, files previously asked about have been extracted already. With the r, u, and d function keys, no change has been made to the tape.
RESTRICTIONS
A single file with several links to it is treated like several files.
Binary-coded control information makes magnetic tapes written by tp difficult to carry to other machines. The tar() command avoids this problem.
DIAGNOSTICS
There are several. The least obvious one is ‘Phase error’, which means the file changed after it was selected for dumping but before it was dumped.
FILES
/dev/tap?
DECtape archive
/dev/rmt?h or /dev/nmt?h
Magnetic tape archive