Commit | Line | Data |
---|---|---|
60a17f4e JH |
1 | .TH MT 1L \" -*- nroff -*- |
2 | .SH NAME | |
3 | mt \- control magnetic tape drive operation | |
4 | .SH SYNOPSIS | |
5 | .B mt | |
6 | [\-V] [\-f device] [\-\-file=device] [\-\-version] | |
7 | operation [count] | |
8 | .SH DESCRIPTION | |
9 | This manual page | |
10 | documents the GNU version of | |
11 | .BR mt . | |
12 | .B mt | |
13 | performs the given | |
14 | .IR operation , | |
15 | which must be one of the tape operations listed below, on a tape | |
16 | drive. | |
17 | .PP | |
18 | The default tape device to operate on is taken from the file | |
19 | .I /usr/include/sys/mtio.h | |
20 | when | |
21 | .B mt | |
22 | is compiled. It can be overridden by giving a device file name in | |
23 | the environment variable | |
24 | .BR TAPE | |
25 | or by a command line option (see below), which also overrides the | |
26 | environment variable. | |
27 | .PP | |
28 | The device must be either a character special file or a | |
29 | remote tape drive. To use a tape drive on another machine as the | |
30 | archive, use a filename that starts with `HOSTNAME:'. The | |
31 | hostname can be preceded by a username and an `@' to access the remote | |
32 | tape drive as that user, if you have permission to do so (typically an | |
33 | entry in that user's `~/.rhosts' file). | |
34 | .PP | |
35 | The available operations are listed below. Unique abbreviations are | |
36 | accepted. Not all operations are available on all systems, or work on | |
37 | all types of tape drives. | |
38 | Some operations optionally take a repeat count, which can be given | |
39 | after the operation name and defaults to 1. | |
40 | .IP "eof, weof" | |
41 | Write | |
42 | .I count | |
43 | EOF marks at current position. | |
44 | .IP fsf | |
45 | Forward space | |
46 | .I count | |
47 | files. | |
48 | The tape is positioned on the first block of the next file. | |
49 | .IP bsf | |
50 | Backward space | |
51 | .I count | |
52 | files. | |
53 | The tape is positioned on the first block of the next file. | |
54 | .IP fsr | |
55 | Forward space | |
56 | .I count | |
57 | records. | |
58 | .IP bsr | |
59 | Backward space | |
60 | .I count | |
61 | records. | |
62 | .IP bsfm | |
63 | Backward space | |
64 | .I count | |
65 | file marks. | |
66 | The tape is positioned on the beginning-of-the-tape side of | |
67 | the file mark. | |
68 | .IP asf | |
69 | Absolute space to file number | |
70 | .IR count . | |
71 | Equivalent to rewind followed by fsf | |
72 | .IR count . | |
73 | .IP eom | |
74 | Space to the end of the recorded media on the tape | |
75 | (for appending files onto tapes). | |
76 | .IP rewind | |
77 | Rewind the tape. | |
78 | .IP "offline, rewoffl" | |
79 | Rewind the tape and, if applicable, unload the tape. | |
80 | .IP status | |
81 | Print status information about the tape unit. | |
82 | .IP retension | |
83 | Rewind the tape, then wind it to the end of the reel, | |
84 | then rewind it again. | |
85 | .IP erase | |
86 | Erase the tape. | |
87 | .PP | |
88 | .B mt | |
89 | exits with a status of 0 if the operation succeeded, 1 if the | |
90 | operation or device name given was invalid, or 2 if the operation | |
91 | failed. | |
92 | .SS OPTIONS | |
93 | .TP | |
94 | .I "\-f, \-\-file=device" | |
95 | Use | |
96 | .I device | |
97 | as the file name of the tape drive to operate on. | |
98 | To use a | |
99 | tape drive on another machine, use a filename that | |
100 | starts with `HOSTNAME:'. The hostname can be preceded by a | |
101 | username and an `@' to access the remote tape drive as that user, if | |
102 | you have permission to do so (typically an entry in that user's | |
103 | `~/.rhosts' file). | |
104 | .TP | |
105 | .I "\-V, \-\-version" | |
106 | Print the version number of | |
107 | .BR mt . |