Commit | Line | Data |
---|---|---|
7674dc99 C |
1 | .TH MT 1 "11 May 1981" |
2 | .UC 4 | |
3 | .SH NAME | |
4 | mt \- magnetic tape manipulating program | |
5 | .SH SYNOPSIS | |
6 | \fBmt\fP [ \fB\-t\fP \fItapename\fP ] \fIcommand\fP [ \fIcount\fP ] | |
7 | .br | |
8 | \fBmt\fP [ \fB\-f\fP \fItapename\fP ] \fIcommand\fP [ \fIcount\fP ] | |
9 | .SH DESCRIPTION | |
10 | .LP | |
11 | .I Mt | |
12 | is used to give commands to nine-track tape or an archive | |
13 | quarter-inch tape drive. If a tape name is not | |
14 | specified, the environment variable TAPE is used; if no such | |
15 | environment variable exists, | |
16 | .I mt | |
17 | uses the device | |
18 | .IR /dev/rmt12 . | |
19 | Note | |
20 | that | |
21 | .I tapename | |
22 | must reference a raw (not block) tape device. | |
23 | If the optional | |
24 | .I count | |
25 | is not specified, | |
26 | .I mt | |
27 | uses a count of 1. | |
28 | .LP | |
29 | A command can be abbreviated to as few letters as are necessary to | |
30 | uniquely identify it. | |
31 | Here are the commands and the types of tape drives they can apply to: | |
32 | ||
33 | .nf | |
34 | .ta +0.8i +0.8i +1.8i | |
35 | Nine-Track Archive Command Description | |
36 | Yes Yes \fBeof\fP, \fBweof\fP write \fIcount\fP end-of-file marks | |
37 | Yes Yes \fBfsf\fP space forward \fIcount\fP files | |
38 | Yes No \fBfsr\fP space forward \fIcount\fP records | |
39 | Yes No \fBbsf\fP space backward \fIcount\fP files | |
40 | Yes No \fBbsr\fP space backward \fIcount\fP records | |
41 | Yes Yes \fBrewind\fP rewind tape | |
42 | Yes Yes \fBoffline\fP, \fBrewoffl\fP rewind tape and go offline | |
43 | Yes Yes \fBstatus\fP return status of the tape unit | |
44 | .fi | |
45 | .SH FILES | |
46 | .DT | |
47 | /dev/rmt* Raw magnetic tape interface | |
48 | .br | |
49 | /dev/rar* Raw archive cartridge tape interface | |
50 | .SH SEE ALSO | |
51 | ar(4), mt(4), dd(1), ioctl(2), environ(7) | |
52 | .SH MESSAGES | |
53 | .IP "usage: mt [ -f device ] command [ count ]" 10 | |
54 | .br | |
55 | This is a memory jogger message to tell you how to use the \fImt\fP | |
56 | command in the event that you typed something wrong. | |
57 | .IP "mt: don't grok \fIcommand\fP" 10 | |
58 | .br | |
59 | This message indicates that the magnetic tape \fIcommand\fP that you typed as | |
60 | an argument to \fImt\fP was not in the set of requests it recognizes. | |
61 | See the list of correct commands above. | |
62 | .IP "mt: negative repeat count" 10 | |
63 | .br | |
64 | The repeat count for commands such as \fBfsf\fP must be positive. | |
65 | .IP "\fIcommand\fP \fInnn\fP \fIdevice\fP failed: \fIsome error message\fP" 10 | |
66 | .br | |
67 | The magnetic tape \fIcommand\fP applied to \fIdevice\fP with a repeat | |
68 | count of \fInnn\fP did not work for some reason. The reason appears as | |
69 | the string \fIsome\ error\ message\fP. Check that the device | |
70 | name was correct, or that the command is applicable to that device. | |
71 | For example, the message might appear as: | |
72 | .IP | |
73 | fsf 1 f/dev/rar0 failed: File not found | |
74 | .IP "mt: \fIsome error message\fP" 10 | |
75 | .br | |
76 | This message usually means that you are applying the \fImt\fP command to | |
77 | the wrong kind of device, that is, a device that the \fImt\fP command | |
78 | does not recognize. The \fIsome\ error\ message\fP is often cryptic, | |
79 | for example: | |
80 | .IP | |
81 | % \fBmt -f /dev/console fsf 5\fP | |
82 | .IP | |
83 | /dev/console: not a typewriter | |
84 | .IP "mt: can't open \fItapename\fP: \fIsome error message\fP" 10 | |
85 | .br | |
86 | The \fImt\fP command cannot access the device specified by \fItapename\fP. | |
87 | .IP "mt: can't get status from \fItapename\fP: \fIsome error\fP" 10 | |
88 | .br | |
89 | The device specified by \fItapename\fP doesn't support the system call | |
90 | necessary to obtain the status of the tape drive. | |
91 | .SH "EXIT CODES" | |
92 | .IP 0 | |
93 | Successful completion | |
94 | .IP 1 | |
95 | \fIMt\fP did not recognize the command; the device could not be opened. | |
96 | .IP 2 | |
97 | The | |
98 | .IR ioctl (2) | |
99 | system call to the tape driver failed. |