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