.Xr botch fix
[unix-history] / usr / src / usr.bin / mt / mt.1
CommitLineData
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
22is used to give commands to a magnetic tape drive.
23If a tape name is not specified, the environment variable
b5dc1377
CL
24.Ev TAPE
25is used; if
26.Ev TAPE
27does not exist,
28.Nm mt
967568a6 29uses the device
b5dc1377 30.Pa /dev/rmt12 .
967568a6
KM
31Note
32that
b5dc1377 33.Ar tapename
967568a6
KM
34must reference a raw (not block) tape device.
35By default
b5dc1377 36.Nm mt
967568a6
KM
37performs the requested operation once. Operations
38may be performed multiple times by specifying
b5dc1377
CL
39.Ar count .
40.Pp
967568a6
KM
41The available commands are listed below. Only as many
42characters as are required to uniquely identify a command
43need be specified.
b5dc1377
CL
44.Tp Cm eof , weof
45Write
46.Ar count
967568a6 47end-of-file marks at the current position on the tape.
b5dc1377 48.Tp Cm fsf
967568a6 49Forward space
b5dc1377 50.Ar count
967568a6 51files.
b5dc1377
CL
52.Tp Cm fsr
53Forward space
54.Ar count
967568a6 55records.
b5dc1377
CL
56.Tp Cm bsf
57Back space
58.Ar count
967568a6 59files.
b5dc1377 60.Tp Cm bsr
967568a6 61Back space
b5dc1377 62.Ar count
967568a6 63records.
b5dc1377 64.Tp Cm rewind
967568a6 65Rewind the tape
b5dc1377
CL
66(Count is ignored).
67.Tp Cm offline , rewoffl
967568a6 68Rewind the tape and place the tape unit off-line
b5dc1377
CL
69(Count is ignored).
70.Tp Cm status
967568a6 71Print status information about the tape unit.
b5dc1377
CL
72.Tp
73.Pp
74.Nm Mt
967568a6
KM
75returns a 0 exit status when the operation(s) were successful,
761 if the command was unrecognized, and 2 if an operation failed.
b5dc1377 77.Sh ENVIRONMENT
5325ced3
CL
78If the following environment variable exists, it is utilized by
79.Nm mt .
b5dc1377
CL
80.Tw Fl
81.Tp Ev TAPE
82.Nm Mt
83checks the
84.Ev TAPE
85environment variable if the
86argument
5325ced3
CL
87.Ar tapename
88is not given.
b5dc1377
CL
89.Sh FILES
90.Dw /dev/rmt*
91.Di L
92.Dp Pa /dev/rmt*
93Raw 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
102appeared in 4.3 BSD.
103.\" mt.1: mtio(4) missing