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