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] [\-\-rsh-command=command] [\-\-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 fsfm
|
---|
69 | Forward space
|
---|
70 | .I count
|
---|
71 | file marks.
|
---|
72 | The tape is positioned on the beginning-of-the-tape side of
|
---|
73 | the file mark.
|
---|
74 | .IP asf
|
---|
75 | Absolute space to file number
|
---|
76 | .IR count .
|
---|
77 | Equivalent to rewind followed by fsf
|
---|
78 | .IR count .
|
---|
79 | .IP seek
|
---|
80 | Seek to block number
|
---|
81 | .IR count .
|
---|
82 | .IP eom
|
---|
83 | Space to the end of the recorded media on the tape
|
---|
84 | (for appending files onto tapes).
|
---|
85 | .IP rewind
|
---|
86 | Rewind the tape.
|
---|
87 | .IP "offline, rewoffl"
|
---|
88 | Rewind the tape and, if applicable, unload the tape.
|
---|
89 | .IP status
|
---|
90 | Print status information about the tape unit.
|
---|
91 | .IP retension
|
---|
92 | Rewind the tape, then wind it to the end of the reel,
|
---|
93 | then rewind it again.
|
---|
94 | .IP erase
|
---|
95 | Erase the tape.
|
---|
96 | .PP
|
---|
97 | .B mt
|
---|
98 | exits with a status of 0 if the operation succeeded, 1 if the
|
---|
99 | operation or device name given was invalid, or 2 if the operation
|
---|
100 | failed.
|
---|
101 | .SS OPTIONS
|
---|
102 | .TP
|
---|
103 | .I "\-f, \-\-file=device"
|
---|
104 | Use
|
---|
105 | .I device
|
---|
106 | as the file name of the tape drive to operate on.
|
---|
107 | To use a
|
---|
108 | tape drive on another machine, use a filename that
|
---|
109 | starts with `HOSTNAME:'. The hostname can be preceded by a
|
---|
110 | username and an `@' to access the remote tape drive as that user, if
|
---|
111 | you have permission to do so (typically an entry in that user's
|
---|
112 | `~/.rhosts' file).
|
---|
113 | .TP
|
---|
114 | .I "\-\-rsh-command=command"
|
---|
115 | Notifies
|
---|
116 | .B mt
|
---|
117 | that it should use
|
---|
118 | .I command
|
---|
119 | to communicate with remote devices instead of
|
---|
120 | .I /usr/bin/ssh
|
---|
121 | or
|
---|
122 | .IR /usr/bin/rsh .
|
---|
123 | .TP
|
---|
124 | .I "\-V, \-\-version"
|
---|
125 | Print the version number of
|
---|
126 | .BR mt .
|
---|