Commit | Line | Data |
---|---|---|
b5dc1377 | 1 | .\" Copyright (c) 1981, 1990 The Regents of the University of California. |
f56e8d15 | 2 | .\" All rights reserved. |
7345243f | 3 | .\" |
b5dc1377 | 4 | .\" %sccs.include.redist.man% |
7345243f | 5 | .\" |
5325ced3 | 6 | .\" @(#)mt.1 6.5 (Berkeley) %G% |
f56e8d15 | 7 | .\" |
b5dc1377 CL |
8 | .Dd |
9 | .Os BSD 4.4 | |
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 KM |
22 | is used to give commands to a magnetic tape drive. |
23 | If a tape name is not specified, the environment variable | |
b5dc1377 CL |
24 | .Ev TAPE |
25 | is used; if | |
26 | .Ev TAPE | |
27 | does not exist, | |
28 | .Nm mt | |
967568a6 | 29 | uses the device |
b5dc1377 | 30 | .Pa /dev/rmt12 . |
967568a6 KM |
31 | Note |
32 | that | |
b5dc1377 | 33 | .Ar tapename |
967568a6 KM |
34 | must reference a raw (not block) tape device. |
35 | By default | |
b5dc1377 | 36 | .Nm mt |
967568a6 KM |
37 | performs the requested operation once. Operations |
38 | may be performed multiple times by specifying | |
b5dc1377 CL |
39 | .Ar count . |
40 | .Pp | |
967568a6 KM |
41 | The available commands are listed below. Only as many |
42 | characters as are required to uniquely identify a command | |
43 | need be specified. | |
b5dc1377 CL |
44 | .Tp Cm eof , weof |
45 | Write | |
46 | .Ar count | |
967568a6 | 47 | end-of-file marks at the current position on the tape. |
b5dc1377 | 48 | .Tp Cm fsf |
967568a6 | 49 | Forward space |
b5dc1377 | 50 | .Ar count |
967568a6 | 51 | files. |
b5dc1377 CL |
52 | .Tp Cm fsr |
53 | Forward space | |
54 | .Ar count | |
967568a6 | 55 | records. |
b5dc1377 CL |
56 | .Tp Cm bsf |
57 | Back space | |
58 | .Ar count | |
967568a6 | 59 | files. |
b5dc1377 | 60 | .Tp Cm bsr |
967568a6 | 61 | Back space |
b5dc1377 | 62 | .Ar count |
967568a6 | 63 | records. |
b5dc1377 | 64 | .Tp Cm rewind |
967568a6 | 65 | Rewind the tape |
b5dc1377 CL |
66 | (Count is ignored). |
67 | .Tp Cm offline , rewoffl | |
967568a6 | 68 | Rewind the tape and place the tape unit off-line |
b5dc1377 CL |
69 | (Count is ignored). |
70 | .Tp Cm status | |
967568a6 | 71 | Print status information about the tape unit. |
b5dc1377 CL |
72 | .Tp |
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 . | |
b5dc1377 CL |
80 | .Tw Fl |
81 | .Tp Ev TAPE | |
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 CL |
89 | .Sh FILES |
90 | .Dw /dev/rmt* | |
91 | .Di L | |
92 | .Dp Pa /dev/rmt* | |
93 | Raw magnetic tape interface | |
94 | .Dp | |
95 | .Sh SEE ALSO | |
96 | .\".Xr mtio 4 , | |
97 | .Xr dd 1 , | |
98 | .Xr ioctl 2 , | |
99 | .Xr environ 7 | |
100 | .Sh HISTORY | |
101 | .Nm Mt | |
102 | appeared in 4.3 BSD. | |
103 | .\" mt.1: mtio(4) missing |