Commit | Line | Data |
---|---|---|
b5dc1377 | 1 | .\" Copyright (c) 1981, 1990 The Regents of the University of California. |
f56e8d15 | 2 | .\" All rights reserved. |
7345243f | 3 | .\" |
7345243f | 4 | .\" |
555f1dc6 CL |
5 | .\" %sccs.include.redist.roff% |
6 | .\" | |
7 | .\" @(#)mt.1 6.7 (Berkeley) %G% | |
f56e8d15 | 8 | .\" |
b5dc1377 | 9 | .Dd |
b5dc1377 CL |
10 | .Dt MT 1 |
11 | .Os BSD 4 | |
12 | .Sh NAME | |
13 | .Nm mt | |
14 | .Nd magnetic tape manipulating program | |
15 | .Sh SYNOPSIS | |
16 | .Nm mt | |
17 | .Op Fl f Ar tapename | |
18 | .Ar command | |
19 | .Op Ar count | |
20 | .Sh DESCRIPTION | |
21 | .Nm Mt | |
967568a6 | 22 | is used to give commands to a magnetic tape drive. |
967568a6 | 23 | By default |
b5dc1377 | 24 | .Nm mt |
967568a6 KM |
25 | performs the requested operation once. Operations |
26 | may be performed multiple times by specifying | |
b5dc1377 | 27 | .Ar count . |
555f1dc6 CL |
28 | Note |
29 | that | |
30 | .Ar tapename | |
31 | must reference a raw (not block) tape device. | |
b5dc1377 | 32 | .Pp |
967568a6 KM |
33 | The available commands are listed below. Only as many |
34 | characters as are required to uniquely identify a command | |
35 | need be specified. | |
555f1dc6 CL |
36 | .Bl -tag -width "eof, weof" |
37 | .It Cm eof , weof | |
b5dc1377 CL |
38 | Write |
39 | .Ar count | |
967568a6 | 40 | end-of-file marks at the current position on the tape. |
555f1dc6 | 41 | .It Cm fsf |
967568a6 | 42 | Forward space |
b5dc1377 | 43 | .Ar count |
967568a6 | 44 | files. |
555f1dc6 | 45 | .It Cm fsr |
b5dc1377 CL |
46 | Forward space |
47 | .Ar count | |
967568a6 | 48 | records. |
555f1dc6 | 49 | .It Cm bsf |
b5dc1377 CL |
50 | Back space |
51 | .Ar count | |
967568a6 | 52 | files. |
555f1dc6 | 53 | .It Cm bsr |
967568a6 | 54 | Back space |
b5dc1377 | 55 | .Ar count |
967568a6 | 56 | records. |
555f1dc6 | 57 | .It Cm rewind |
967568a6 | 58 | Rewind the tape |
b5dc1377 | 59 | (Count is ignored). |
555f1dc6 | 60 | .It Cm offline , rewoffl |
967568a6 | 61 | Rewind the tape and place the tape unit off-line |
b5dc1377 | 62 | (Count is ignored). |
555f1dc6 | 63 | .It Cm status |
967568a6 | 64 | Print status information about the tape unit. |
555f1dc6 CL |
65 | .El |
66 | .Pp | |
67 | If a tape name is not specified, and the environment variable | |
68 | .Ev TAPE | |
69 | does not exist; | |
70 | .Nm mt | |
71 | uses the device | |
72 | .Pa /dev/rmt12 . | |
b5dc1377 CL |
73 | .Pp |
74 | .Nm Mt | |
967568a6 KM |
75 | returns a 0 exit status when the operation(s) were successful, |
76 | 1 if the command was unrecognized, and 2 if an operation failed. | |
b5dc1377 | 77 | .Sh ENVIRONMENT |
5325ced3 CL |
78 | If the following environment variable exists, it is utilized by |
79 | .Nm mt . | |
555f1dc6 CL |
80 | .Bl -tag -width Fl |
81 | .It Ev TAPE | |
b5dc1377 CL |
82 | .Nm Mt |
83 | checks the | |
84 | .Ev TAPE | |
85 | environment variable if the | |
86 | argument | |
5325ced3 CL |
87 | .Ar tapename |
88 | is not given. | |
b5dc1377 | 89 | .Sh FILES |
555f1dc6 CL |
90 | .Bl -tag -width /dev/rmt* -compact |
91 | .It Pa /dev/rmt* | |
b5dc1377 | 92 | Raw magnetic tape interface |
555f1dc6 | 93 | .El |
b5dc1377 CL |
94 | .Sh SEE ALSO |
95 | .\".Xr mtio 4 , | |
96 | .Xr dd 1 , | |
97 | .Xr ioctl 2 , | |
98 | .Xr environ 7 | |
99 | .Sh HISTORY | |
555f1dc6 CL |
100 | The |
101 | .Nm mt | |
102 | command appeared in | |
103 | .Bx 4.3 . | |
b5dc1377 | 104 | .\" mt.1: mtio(4) missing |