Move everything from /var/adm to /var/log
[unleashed.git] / share / man / man1 / mt.1
blobb42ec9013a0c5d9d0ae973b9e988fcf6ee29b1a8
1 '\" te
2 .\"  Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH MT 1 "Jun 21, 2007"
7 .SH NAME
8 mt \- magnetic tape control
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBmt\fR [\fB-f\fR \fItapename\fR] \fIcommand\fR... [\fIcount\fR]
13 .fi
15 .SH DESCRIPTION
16 .LP
17 The \fBmt\fR utility sends commands to a magnetic tape drive. If \fB-f\fR
18 \fItapename\fR is not specified, the environment variable \fBTAPE\fR is used.
19 If \fBTAPE\fR does not exist, \fBmt\fR uses the device \fB/dev/rmt/0n\fR.
20 .SH OPTIONS
21 .LP
22 The following options are supported:
23 .sp
24 .ne 2
25 .na
26 \fB\fB-f\fR \fItapename\fR\fR
27 .ad
28 .RS 15n
29 Specifies the raw tape device.
30 .RE
32 .SH OPERANDS
33 .LP
34 The following operands are supported:
35 .sp
36 .ne 2
37 .na
38 \fB\fIcount\fR\fR
39 .ad
40 .RS 11n
41 The number of times that the requested operation is to be performed. By
42 default, \fBmt\fR performs \fIcommand\fR once. Multiple operations of
43 \fIcommand\fR can be performed by specifying \fIcount\fR.
44 .RE
46 .sp
47 .ne 2
48 .na
49 \fB\fIcommand\fR\fR
50 .ad
51 .RS 11n
52 The following available commands that can be sent to a magnetic tape drive are
53 supported. Only as many characters as are required to uniquely identify a
54 \fIcommand\fR need be specified.
55 .sp
56 .ne 2
57 .na
58 \fB\fBasf\fR\fR
59 .ad
60 .RS 10n
61 Specifies absolute space to \fIcount\fR file number. This is equivalent to a
62 \fBrewind\fR followed by a \fBfsf\fR \fIcount\fR.
63 .RE
65 .sp
66 .ne 2
67 .na
68 \fB\fBbsf\fR\fR
69 .ad
70 .RS 10n
71 Back spaces over \fIcount\fR EOF marks. The tape is positioned on the
72 beginning-of-tape side of the EOF mark.
73 .RE
75 .sp
76 .ne 2
77 .na
78 \fB\fBbsr\fR\fR
79 .ad
80 .RS 10n
81 Back spaces \fIcount\fR records.
82 .RE
84 .sp
85 .ne 2
86 .na
87 \fB\fBbssf\fR\fR
88 .ad
89 .RS 10n
90 Back spaces over the requested number of sequential file marks. Sequential file
91 marks are where the file marks are one right after the other with no other
92 blocks of any kind between the file marks. The number argument specifies how
93 many sequential file marks to which to space. For example, \fBbssf 4\fR
94 searches backwards to the first place where there are 4 sequential file marks
95 and positions to the BOP side of the 4th file mark.
96 .sp
97 This command is not supported by all drives.
98 .RE
101 .ne 2
103 \fB\fBeof\fR\fR
107 \fB\fBweof\fR\fR
109 .RS 10n
110 Writes \fIcount\fR EOF marks at the current position on the tape.
114 .ne 2
116 \fB\fBfsf\fR\fR
118 .RS 10n
119 Forward spaces over \fIcount\fR EOF marks. The tape is positioned on the first
120 block of the file.
124 .ne 2
126 \fB\fBfsr\fR\fR
128 .RS 10n
129 Forward spaces \fIcount\fR records.
133 .ne 2
135 \fB\fBfssf\fR\fR
137 .RS 10n
138 Forward spaces the over requested number of sequential file marks. Sequential
139 file marks are where the file marks are one right after the other with no other
140 blocks of any kind between the file marks. The number argument specifies how
141 many sequential file marks to which to space. For example, \fBfssf 4\fR
142 searches forwards to the first place where there are 4 sequential file marks
143 and positions after the 4th file mark.
145 This command is not supported by all drives.
149 .ne 2
151 \fB\fBload\fR\fR
153 .RS 10n
154 Requests drive load and thread current media. Not supported by all drives.
158 .ne 2
160 \fB\fBlock\fR\fR
162 .RS 10n
163 Prevents media removal.
167 .ne 2
169 \fB\fBnbsf\fR\fR
171 .RS 10n
172 Back spaces \fIcount\fR files. The tape is positioned on the first block of the
173 file. This is equivalent to \fIcount+1\fR \fBbsf\fRs followed by one \fBfsf\fR.
177 .ne 2
179 \fB\fBseek\fR\fR
181 .RS 10n
182 Positions to requested logical tape position.
186 .ne 2
188 \fB\fBtell\fR\fR
190 .RS 10n
191 Gets and prints current logical tape position.
195 .ne 2
197 \fB\fBunlock\fR\fR
199 .RS 10n
200 Allows media removal.
203 If \fIcount\fR is specified with any of the following commands, the \fIcount\fR
204 is ignored and the command is performed only once.
206 .ne 2
208 \fB\fBconfig\fR\fR
210 .RS 16n
211 Reads the drives current configuration from the driver and displays it in
212 \fBst.conf\fR format. See \fBst\fR(7D) for definition of fields and there
213 meanings.
217 .ne 2
219 \fB\fBeom\fR\fR
221 .RS 16n
222 Spaces to the end of recorded media on the tape. This is useful for appending
223 files onto previously written tapes.
227 .ne 2
229 \fB\fBerase\fR\fR
231 .RS 16n
232 Erases the entire tape.
234 Some tape drives have option settings where only portions of the tape can be
235 erased. Be sure to select the correct setting to erase the whole tape. Erasing
236 a tape can take a long time depending on the device and/or tape. Refer to the
237 device specific manual for time details.
241 .ne 2
243 \fB\fBforcereserve\fR\fR
245 .RS 16n
246 Attempts to break a SCSI II reserve issued by another initiator. When this
247 command completes, the drive is not reserved for the current initiator, but is
248 available for use. This command can be only be executed by those with
249 super-user privileges.
253 .ne 2
255 \fB\fBoffline\fR\fR
259 \fB\fBrewoffl\fR\fR
261 .RS 16n
262 Rewinds the tape and, if appropriate, takes the drive unit off-line by
263 unloading the tape.
267 .ne 2
269 \fB\fBrelease\fR\fR
271 .RS 16n
272 Re-establishes the default behavior of releasing at close.
276 .ne 2
278 \fB\fBreserve\fR\fR
280 .RS 16n
281 Allows the tape drive to remain reserved after closing the device. The drive
282 must then be explicitly released.
286 .ne 2
288 \fB\fBretension\fR\fR
290 .RS 16n
291 Rewinds the cartridge tape completely, then winds it forward to the end of the
292 reel and back to beginning-of-tape to smooth out tape tension.
296 .ne 2
298 \fB\fBrewind\fR\fR
300 .RS 16n
301 Rewinds the tape.
305 .ne 2
307 \fB\fBstatus\fR\fR
309 .RS 16n
310 Prints status information about the tape unit.
312 Status information can include the sense key reported by the drive, the
313 residual and retries for the last operation, the current tape position reported
314 in file number, and the number of blocks from the beginning of that file. It
315 might also report that WORM media is loaded in that drive.
320 .SH EXIT STATUS
321 .ne 2
323 \fB\fB0\fR\fR
325 .RS 5n
326 All operations were successful.
330 .ne 2
332 \fB\fB1\fR\fR
334 .RS 5n
335 Command was unrecognized or \fBmt\fR was unable to open the specified tape
336 drive.
340 .ne 2
342 \fB\fB2\fR\fR
344 .RS 5n
345 An operation failed.
348 .SH FILES
349 .ne 2
351 \fB\fB/dev/rmt/*\fR\fR
353 .RS 14n
354 magnetic tape interface
357 .SH SEE ALSO
359 \fBtar\fR(1), \fBtcopy\fR(1), \fBar.h\fR(3HEAD), \fBattributes\fR(5),
360 \fBmtio\fR(7I), \fBst\fR(7D)
361 .SH BUGS
363 Not all devices support all options. Some options are hardware-dependent. Refer
364 to the corresponding device manual page.
367 \fBmt\fR is architecture sensitive. Heterogeneous operation (that is, SPARC to
368 x86 or the reverse) is not supported.