Commit | Line | Data |
---|---|---|
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 | |
22 | mt \- 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 |
35 | is used to give commands to a magnetic tape drive. |
36 | If a tape name is not specified, the environment variable | |
37 | TAPE is used; if TAPE does not exist, | |
38 | .I mt | |
39 | uses the device | |
40 | .IR /dev/rmt12 . | |
41 | Note | |
42 | that | |
43 | .I tapename | |
44 | must reference a raw (not block) tape device. | |
45 | By default | |
46 | .I mt | |
47 | performs the requested operation once. Operations | |
48 | may be performed multiple times by specifying | |
49 | .IR count . | |
7345243f | 50 | .PP |
967568a6 KM |
51 | The available commands are listed below. Only as many |
52 | characters as are required to uniquely identify a command | |
53 | need be specified. | |
54 | .TP | |
55 | .BR eof , " weof" | |
56 | Write | |
7345243f | 57 | .I count |
967568a6 KM |
58 | end-of-file marks at the current position on the tape. |
59 | .TP | |
60 | .B fsf | |
61 | Forward space | |
7345243f | 62 | .I count |
967568a6 KM |
63 | files. |
64 | .TP | |
65 | .B fsr | |
66 | Forward space | |
7345243f | 67 | .I count |
967568a6 KM |
68 | records. |
69 | .TP | |
70 | .B bsf | |
71 | Back space | |
7345243f | 72 | .I count |
967568a6 KM |
73 | files. |
74 | .TP | |
75 | .B bsr | |
76 | Back space | |
7345243f | 77 | .I count |
967568a6 KM |
78 | records. |
79 | .TP | |
80 | .B rewind | |
81 | Rewind the tape | |
82 | .RI ( Count | |
bfe02f44 | 83 | is ignored). |
967568a6 KM |
84 | .TP |
85 | .BR offline , " rewoffl" | |
86 | Rewind the tape and place the tape unit off-line | |
87 | .RI ( Count | |
bfe02f44 | 88 | is ignored). |
967568a6 KM |
89 | .TP |
90 | .B status | |
91 | Print status information about the tape unit. | |
92 | .PP | |
93 | .I Mt | |
94 | returns a 0 exit status when the operation(s) were successful, | |
95 | 1 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" |
100 | mtio(4), dd(1), ioctl(2), environ(7) |