1mt(1) User Commands mt(1)
2
3
4
6 mt - magnetic tape control
7
9 mt [-f tapename] command... [count]
10
11
13 The mt utility sends commands to a magnetic tape drive. If -f tapename
14 is not specified, the environment variable TAPE is used. If TAPE does
15 not exist, mt uses the device /dev/rmt/0n.
16
18 The following options are supported:
19
20 -f tapename Specifies the raw tape device.
21
22
24 The following operands are supported:
25
26 count The number of times that the requested operation is to be
27 performed. By default, mt performs command once. Multiple
28 operations of command can be performed by specifying count.
29
30
31 command The following available commands that can be sent to a mag‐
32 netic tape drive are supported. Only as many characters as
33 are required to uniquely identify a command need be speci‐
34 fied.
35
36 asf Specifies absolute space to count file number.
37 This is equivalent to a rewind followed by a fsf
38 count.
39
40
41 bsf Back spaces over count EOF marks. The tape is
42 positioned on the beginning-of-tape side of the
43 EOF mark.
44
45
46 bsr Back spaces count records.
47
48
49 bssf Back spaces over the requested number of sequen‐
50 tial file marks. Sequential file marks are where
51 the file marks are one right after the other with
52 no other blocks of any kind between the file
53 marks. The number argument specifies how many
54 sequential file marks to which to space. For exam‐
55 ple, bssf 4 searches backwards to the first place
56 where there are 4 sequential file marks and posi‐
57 tions to the BOP side of the 4th file mark.
58
59 This command is not supported by all drives.
60
61
62 eof Writes count EOF marks at the current position on
63 weof the tape.
64
65
66 fsf Forward spaces over count EOF marks. The tape is
67 positioned on the first block of the file.
68
69
70 fsr Forward spaces count records.
71
72
73 fssf Forward spaces the over requested number of
74 sequential file marks. Sequential file marks are
75 where the file marks are one right after the other
76 with no other blocks of any kind between the file
77 marks. The number argument specifies how many
78 sequential file marks to which to space. For exam‐
79 ple, fssf 4 searches forwards to the first place
80 where there are 4 sequential file marks and posi‐
81 tions after the 4th file mark.
82
83 This command is not supported by all drives.
84
85
86 load Requests drive load and thread current media. Not
87 supported by all drives.
88
89
90 lock Prevents media removal.
91
92
93 nbsf Back spaces count files. The tape is positioned on
94 the first block of the file. This is equivalent to
95 count+1 bsfs ollowed by one fsf.
96
97
98 seek Positions to requested logical tape position.
99
100
101 tell Gets and prints current logical tape position.
102
103
104 unlock Allows media removal.
105
106 If count is specified with any of the following commands,
107 the count is ignored and the command is performed only once.
108
109 config Reads the drives current configuration from
110 the driver and displays it in st.conf for‐
111 mat. See st(7D) for definition of fields and
112 there meanings.
113
114
115 eom Spaces to the end of recorded media on the
116 tape. This is useful for appending files
117 onto previously written tapes.
118
119
120 erase Erases the entire tape.
121
122 Some tape drives have option settings where
123 only portions of the tape can be erased. Be
124 sure to select the correct setting to erase
125 the whole tape. Erasing a tape can take a
126 long time depending on the device and/or
127 tape. Refer to the device specific manual
128 for time details.
129
130
131 forcereserve Attempts to break a SCSI II reserve issued
132 by another initiator. When this command com‐
133 pletes, the drive is not reserved for the
134 current initiator, but is available for use.
135 This command can be only be executed by
136 those with super-user privileges.
137
138
139 offline Rewinds the tape and, if appropriate, takes
140 rewoffl the drive unit off-line by unloading the
141 tape.
142
143
144 release Re-establishes the default behavior of
145 releasing at close.
146
147
148 reserve Allows the tape drive to remain reserved
149 after closing the device. The drive must
150 then be explicitly released.
151
152
153 retension Rewinds the cartridge tape completely, then
154 winds it forward to the end of the reel and
155 back to beginning-of-tape to smooth out tape
156 tension.
157
158
159 rewind Rewinds the tape.
160
161
162 status Prints status information about the tape
163 unit.
164
165 Status information can include the sense key
166 reported by the drive, the residual and
167 retries for the last operation, the current
168 tape position reported in file number, and
169 the number of blocks from the beginning of
170 that file. It might also report that WORM
171 media is loaded in that drive.
172
173
174
176 0 All operations were successful.
177
178
179 1 Command was unrecognized or mt was unable to open the specified
180 tape drive.
181
182
183 2 An operation failed.
184
185
187 /dev/rmt/* magnetic tape interface
188
189
191 See attributes(5) for descriptions of the following attributes:
192
193
194
195
196 ┌─────────────────────────────┬─────────────────────────────┐
197 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
198 ├─────────────────────────────┼─────────────────────────────┤
199 │Availability │SUNWcsu │
200 └─────────────────────────────┴─────────────────────────────┘
201
203 tar(1), tcopy(1), ar.h(3HEAD), attributes(5), mtio(7I), st(7D)
204
206 Not all devices support all options. Some options are hardware-depen‐
207 dent. Refer to the corresponding device manual page.
208
209
210 mt is architecture sensitive. Heterogeneous operation (that is, SPARC
211 to x86 or the reverse) is not supported.
212
213
214
215SunOS 5.11 21 Jun 2007 mt(1)