added "more" command
[unix-history] / usr / src / usr.bin / mt / mt.1
CommitLineData
7345243f
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
82557bb9 5.\" @(#)mt.1 6.1 (Berkeley) %G%
7345243f 6.\"
82557bb9 7.TH MT 1 ""
7345243f
KM
8.UC 4
9.SH NAME
10mt \- magnetic tape manipulating program
11.SH SYNOPSIS
12.B mt
13[
967568a6 14.B \-f
7345243f
KM
15.I tapename
16]
17.I command
18[
19.I count
20]
21.SH DESCRIPTION
7345243f 22.I Mt
967568a6
KM
23is used to give commands to a magnetic tape drive.
24If a tape name is not specified, the environment variable
25TAPE is used; if TAPE does not exist,
26.I mt
27uses the device
28.IR /dev/rmt12 .
29Note
30that
31.I tapename
32must reference a raw (not block) tape device.
33By default
34.I mt
35performs the requested operation once. Operations
36may be performed multiple times by specifying
37.IR count .
7345243f 38.PP
967568a6
KM
39The available commands are listed below. Only as many
40characters as are required to uniquely identify a command
41need be specified.
42.TP
43.BR eof , " weof"
44Write
7345243f 45.I count
967568a6
KM
46end-of-file marks at the current position on the tape.
47.TP
48.B fsf
49Forward space
7345243f 50.I count
967568a6
KM
51files.
52.TP
53.B fsr
54Forward space
7345243f 55.I count
967568a6
KM
56records.
57.TP
58.B bsf
59Back space
7345243f 60.I count
967568a6
KM
61files.
62.TP
63.B bsr
64Back space
7345243f 65.I count
967568a6
KM
66records.
67.TP
68.B rewind
69Rewind the tape
70.RI ( Count
71is ignored.)
72.TP
73.BR offline , " rewoffl"
74Rewind the tape and place the tape unit off-line
75.RI ( Count
76is ignored.)
77.TP
78.B status
79Print status information about the tape unit.
80.PP
81.I Mt
82returns a 0 exit status when the operation(s) were successful,
831 if the command was unrecognized, and 2 if an operation failed.
7345243f
KM
84.SH FILES
85.DT
86/dev/rmt* Raw magnetic tape interface
967568a6
KM
87.SH "SEE ALSO"
88mtio(4), dd(1), ioctl(2), environ(7)