2.9BSD/usr/man/man1/mt.1

Compare this file to the similar file:
Show the results in this format:

.TH MT 1
.UC
.SH NAME
mt \- magnetic tape manipulating program
.SH SYNOPSIS
\fBmt\fP [ \fB\-t\fP \fItapename\fP ] \fIcommand\fP [ \fIcount\fP ]
.br
\fBmt\fP [ \fB\-f\fP \fItapename\fP ] \fIcommand\fP [ \fIcount\fP ]
.SH DESCRIPTION
.LP
.I Mt
is used to give commands to nine-track tape.  If a tape name is not
specified, the environment variable TAPE is used;  if no such
environment variable exists,
.I mt
uses the device
.IR /dev/nrmt1 .
Note
that
.I tapename
must reference a raw (not block) tape device.
If the optional
.I count
is not specified, 
.I mt
uses a count of 1.
.LP
A command can be abbreviated to as few letters as are necessary to
uniquely identify it. 
Here are the commands and the types of tape drives they can apply to:

.nf
.ta +2i
Command	Description
\fBeof\fP, \fBweof\fP	write \fIcount\fP end-of-file marks
\fBfsf\fP	space forward \fIcount\fP files
\fBfsr\fP	space forward \fIcount\fP records
\fBbsf\fP	space backward \fIcount\fP files
\fBbsr\fP	space backward \fIcount\fP records
\fBrewind\fP	rewind tape
\fBoffline\fP, \fBrewoffl\fP	rewind tape and go offline
\fBstatus\fP	return status of the tape unit
.fi
.SH FILES
.ta 2i
/dev/rmt*	Raw magnetic tape interface
.SH SEE ALSO
dd(1), ioctl(2), mt(4), environ(5)
.SH MESSAGES
.IP "usage: mt [ \-f device ] command [ count ]" 10
.br
This is a memory jogger message to tell you how to use the \fImt\fP
command in the event that you typed something wrong.
.IP "mt: don't grok \fIcommand\fP" 10
.br
This message indicates that the magnetic tape \fIcommand\fP that you typed as
an argument to \fImt\fP was not in the set of requests it recognizes.
See the list of correct commands above.
.IP "mt: negative repeat count" 10
.br
The repeat count for commands such as \fBfsf\fP must be positive.
.IP "\fIcommand\fP \fInnn\fP \fIdevice\fP failed: \fIsome error message\fP" 10
.br
The magnetic tape \fIcommand\fP applied to \fIdevice\fP with a repeat
count of \fInnn\fP did not work for some reason.  The reason appears as
the string \fIsome\ error\ message\fP.  Check that the device
name was correct, or that the command is applicable to that device.
For example, the message might appear as:
.IP
fsf 1 f/dev/rmt0 failed: File not found
.IP "mt: \fIsome error message\fP" 10
.br
This message usually means that you are applying the \fImt\fP command to
the wrong kind of device, that is, a device that the \fImt\fP command
does not recognize.  The \fIsome\ error\ message\fP is often cryptic,
for example:
.IP
% \fBmt  \-f /dev/console  fsf 5\fP
.IP
/dev/console: Inappropriate ioctl for device
.IP "mt: can't open \fItapename\fP: \fIsome error message\fP" 10
.br
The \fImt\fP command cannot access the device specified by \fItapename\fP.
.IP "mt: can't get status from \fItapename\fP: \fIsome error\fP" 10
.br
The device specified by \fItapename\fP doesn't support the system call
necessary to obtain the status of the tape drive.
.SH "EXIT CODES"
.IP 0
Successful completion
.IP 1
\fIMt\fP did not recognize the command;  the device could not be opened.
.IP 2
The
.IR ioctl (2)
system call to the tape driver failed.
.SH BUGS
Commands are not interruptible.