Commit | Line | Data |
---|---|---|
15637ed4 RG |
1 | .\" Copyright (c) 1981, 1990 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" | |
5 | .\" Redistribution and use in source and binary forms, with or without | |
6 | .\" modification, are permitted provided that the following conditions | |
7 | .\" are met: | |
8 | .\" 1. Redistributions of source code must retain the above copyright | |
9 | .\" notice, this list of conditions and the following disclaimer. | |
10 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
11 | .\" notice, this list of conditions and the following disclaimer in the | |
12 | .\" documentation and/or other materials provided with the distribution. | |
13 | .\" 3. All advertising materials mentioning features or use of this software | |
14 | .\" must display the following acknowledgement: | |
15 | .\" This product includes software developed by the University of | |
16 | .\" California, Berkeley and its contributors. | |
17 | .\" 4. Neither the name of the University nor the names of its contributors | |
18 | .\" may be used to endorse or promote products derived from this software | |
19 | .\" without specific prior written permission. | |
20 | .\" | |
21 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
22 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
23 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
24 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
25 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
26 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
27 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
28 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
29 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
30 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
31 | .\" SUCH DAMAGE. | |
32 | .\" | |
33 | .\" @(#)mt.1 6.7 (Berkeley) 7/28/91 | |
34 | .\" | |
35 | .Dd July 28, 1991 | |
36 | .Dt MT 1 | |
37 | .Os BSD 4 | |
38 | .Sh NAME | |
39 | .Nm mt | |
40 | .Nd magnetic tape manipulating program | |
41 | .Sh SYNOPSIS | |
42 | .Nm mt | |
43 | .Op Fl f Ar tapename | |
44 | .Ar command | |
45 | .Op Ar count | |
46 | .Sh DESCRIPTION | |
47 | .Nm Mt | |
48 | is used to give commands to a magnetic tape drive. | |
49 | By default | |
50 | .Nm mt | |
51 | performs the requested operation once. Operations | |
52 | may be performed multiple times by specifying | |
53 | .Ar count . | |
54 | Note | |
55 | that | |
56 | .Ar tapename | |
57 | must reference a raw (not block) tape device. | |
58 | .Pp | |
59 | The available commands are listed below. Only as many | |
60 | characters as are required to uniquely identify a command | |
61 | need be specified. | |
62 | .Bl -tag -width "eof, weof" | |
63 | .It Cm eof , weof | |
64 | Write | |
65 | .Ar count | |
66 | end-of-file marks at the current position on the tape. | |
67 | .It Cm fsf | |
68 | Forward space | |
69 | .Ar count | |
70 | files. | |
71 | .It Cm fsr | |
72 | Forward space | |
73 | .Ar count | |
74 | records. | |
75 | .It Cm bsf | |
76 | Back space | |
77 | .Ar count | |
78 | files. | |
79 | .It Cm bsr | |
80 | Back space | |
81 | .Ar count | |
82 | records. | |
83 | .It Cm rewind | |
84 | Rewind the tape | |
85 | (Count is ignored). | |
86 | .It Cm offline , rewoffl | |
87 | Rewind the tape and place the tape unit off-line | |
88 | (Count is ignored). | |
89 | .It Cm status | |
90 | Print status information about the tape unit. | |
0233b397 RG |
91 | .It Cm erase |
92 | Erase the tape. | |
93 | .It Cm retension | |
94 | Retension the tape. | |
15637ed4 RG |
95 | .El |
96 | .Pp | |
97 | If a tape name is not specified, and the environment variable | |
98 | .Ev TAPE | |
99 | does not exist; | |
100 | .Nm mt | |
101 | uses the device | |
102 | .Pa /dev/rmt12 . | |
103 | .Pp | |
104 | .Nm Mt | |
105 | returns a 0 exit status when the operation(s) were successful, | |
106 | 1 if the command was unrecognized, and 2 if an operation failed. | |
107 | .Sh ENVIRONMENT | |
108 | If the following environment variable exists, it is utilized by | |
109 | .Nm mt . | |
110 | .Bl -tag -width Fl | |
111 | .It Ev TAPE | |
112 | .Nm Mt | |
113 | checks the | |
114 | .Ev TAPE | |
115 | environment variable if the | |
116 | argument | |
117 | .Ar tapename | |
118 | is not given. | |
119 | .Sh FILES | |
120 | .Bl -tag -width /dev/rmt* -compact | |
121 | .It Pa /dev/rmt* | |
122 | Raw magnetic tape interface | |
123 | .El | |
124 | .Sh SEE ALSO | |
125 | .\".Xr mtio 4 , | |
126 | .Xr dd 1 , | |
127 | .Xr ioctl 2 , | |
128 | .Xr environ 7 | |
129 | .Sh HISTORY | |
130 | The | |
131 | .Nm mt | |
132 | command appeared in | |
133 | .Bx 4.3 . | |
134 | .\" mt.1: mtio(4) missing |