make output line buffered if selecting only some of the entries
[unix-history] / usr / src / usr.bin / mt / mt.1
CommitLineData
f56e8d15
KB
1.\" Copyright (c) 1981 The Regents of the University of California.
2.\" All rights reserved.
7345243f 3.\"
f56e8d15
KB
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
7345243f 15.\"
f56e8d15
KB
16.\" @(#)mt.1 6.3 (Berkeley) %G%
17.\"
18.UC 7
82557bb9 19.TH MT 1 ""
7345243f
KM
20.UC 4
21.SH NAME
22mt \- magnetic tape manipulating program
23.SH SYNOPSIS
24.B mt
25[
967568a6 26.B \-f
7345243f
KM
27.I tapename
28]
29.I command
30[
31.I count
32]
33.SH DESCRIPTION
7345243f 34.I Mt
967568a6
KM
35is used to give commands to a magnetic tape drive.
36If a tape name is not specified, the environment variable
37TAPE is used; if TAPE does not exist,
38.I mt
39uses the device
40.IR /dev/rmt12 .
41Note
42that
43.I tapename
44must reference a raw (not block) tape device.
45By default
46.I mt
47performs the requested operation once. Operations
48may be performed multiple times by specifying
49.IR count .
7345243f 50.PP
967568a6
KM
51The available commands are listed below. Only as many
52characters as are required to uniquely identify a command
53need be specified.
54.TP
55.BR eof , " weof"
56Write
7345243f 57.I count
967568a6
KM
58end-of-file marks at the current position on the tape.
59.TP
60.B fsf
61Forward space
7345243f 62.I count
967568a6
KM
63files.
64.TP
65.B fsr
66Forward space
7345243f 67.I count
967568a6
KM
68records.
69.TP
70.B bsf
71Back space
7345243f 72.I count
967568a6
KM
73files.
74.TP
75.B bsr
76Back space
7345243f 77.I count
967568a6
KM
78records.
79.TP
80.B rewind
81Rewind the tape
82.RI ( Count
bfe02f44 83is ignored).
967568a6
KM
84.TP
85.BR offline , " rewoffl"
86Rewind the tape and place the tape unit off-line
87.RI ( Count
bfe02f44 88is ignored).
967568a6
KM
89.TP
90.B status
91Print status information about the tape unit.
92.PP
93.I Mt
94returns a 0 exit status when the operation(s) were successful,
951 if the command was unrecognized, and 2 if an operation failed.
7345243f
KM
96.SH FILES
97.DT
98/dev/rmt* Raw magnetic tape interface
967568a6
KM
99.SH "SEE ALSO"
100mtio(4), dd(1), ioctl(2), environ(7)