date and time created 88/10/19 11:50:43 by bostic
[unix-history] / usr / src / old / tp / tp.1
CommitLineData
3a749e91 1.\" @(#)tp.1 6.1 (Berkeley) %G%
1e41e9d9 2.\"
3a749e91 3.TH TP 1 ""
1e41e9d9
KM
4.AT 3
5.SH NAME
6tp \- manipulate tape archive
7.SH SYNOPSIS
8.B tp
9[ key ] [ name ... ]
10.SH DESCRIPTION
11.PP
12.I Tp
13saves and restores files
14on DECtape or magtape.
15Its actions are controlled by the
16.I key
17argument.
18The key is a string of characters containing
19at most one function letter and possibly
20one or more function modifiers.
21Other arguments to the command are file or directory
22names specifying which files are to be dumped, restored,
23or listed.
24In all cases, appearance of a directory name refers to
25the files and (recursively) subdirectories of that directory.
26.PP
27The function portion of
28the key is specified by one of the following letters:
29.TP 8
30.B r
31The named files
32are written
33on the tape.
34If files with the same names
35already exist, they are replaced.
36`Same' is determined by string comparison, so
37`./abc' can never be the same as `/usr/dmr/abc' even
38if `/usr/dmr' is the current directory.
39If no file argument is given, `\fB.\fR' is the default.
40.TP 8
41.B u
42updates the tape.
43.B u
44is like
45.B r,
46but a file is replaced only if its
47modification date is later than the date stored on the tape;
48that is to say, if it has changed since it was dumped.
49.B u
50is the default command if none is given.
51.TP 8
52.B d
53deletes the named files from
54the tape.
55At least one name argument must be given.
56This function is not permitted on magtapes.
57.TP 8
58.B x
59extracts the named files from the tape to the file system.
60The owner and mode are restored.
61If no file argument is given, the entire contents of the
62tape are extracted.
63.TP 8
64.B t
65lists the names of the specified files.
66If no file argument is given,
67the entire contents of the tape is listed.
68.PP
69The following characters may be used in addition to the letter
70which selects the function desired.
71.TP 10
72.B m
73Specifies magtape as opposed to DECtape.
74.TP 10
75.B 0,...,7
76This
77modifier selects the drive on which the tape is mounted.
78For DECtape,
79.B x
80is default; for magtape
81`0' is the default.
82.TP 10
83.B v
84Normally
85.I tp
86does its work silently.
87The
88.B v
89(verbose)
90option causes it to type the name of each file it treats
91preceded by the function letter.
92With the
93.B t
94function,
95.B v
96gives more information about the
97tape entries than just the name.
98.TP 10
99.B c
100means a fresh dump is being created; the tape directory
101is cleared before beginning.
102Usable only with
103.B r
104and
105.B u.
106This option is assumed with magtape since
107it is impossible to selectively overwrite
108magtape.
109.TP 10
110.B i
111Errors reading and writing the
112tape are noted, but no action is taken.
113Normally, errors cause a return to the command level.
114.TP 10
115.B f
116Use the first named file, rather than a tape,
117as the archive.
118This option currently acts like
119.BR m ;
120.I i.e.
121.BR r
122implies
123.BR c ,
124and neither
125.BR d
126nor
127.BR u
128are permitted.
129.TP 10
130.B w
131causes
132.I tp
133to pause before treating each file, type
134the indicative letter and the file name (as with
135.BR v )
136and await the user's response.
137Response
138.B y
139means `yes', so the file is treated.
140Null response
141means `no', and the file does not take part
142in whatever is being done.
143Response
144.B x
145means `exit';
146the
147.I tp
148command terminates immediately.
149In the
150.B x
151function,
152files previously asked about
153have been extracted already.
154With
155.B "r, u,"
156and
157.B d
158no change has been made to the tape.
159.PP
160.SH FILES
161/dev/tap?
162.br
163/dev/rmt?
164.SH SEE ALSO
165ar(1), tar(1)
166.SH DIAGNOSTICS
167Several; the non-obvious one is
168`Phase error', which means the file changed after it was selected for
169dumping but before it was dumped.
170.SH BUGS
171A single file with several links to it is treated like several files.
172.PP
173Binary-coded control information makes
174magnetic tapes written by
175.I tp
176difficult to carry to other machines;
177.IR tar (1)
178avoids the problem.