File: mt.1

package info (click to toggle)
cpio 2.4.2-23
  • links: PTS
  • area: main
  • in suites: slink
  • size: 836 kB
  • ctags: 704
  • sloc: ansic: 7,997; makefile: 208; sh: 176
file content (186 lines) | stat: -rw-r--r-- 5,186 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
.TH MT 1L \" -*- nroff -*-
.SH NAME
mt \- control magnetic tape drive operation
.SH SYNOPSIS
.B mt
[\-V] [\-f device] [\-\-file=device] [\-\-rsh-command=command] [\-\-version]
operation [count]
.SH DESCRIPTION
This manual page
documents the GNU version of
.BR mt .
.B mt
performs the given
.IR operation ,
which must be one of the tape operations listed below, on a tape
drive.
.PP
The default tape device to operate on is taken from the file
.I /usr/include/sys/mtio.h
when
.B mt
is compiled.  It can be overridden by giving a device file name in
the environment variable
.BR TAPE
or by a command line option (see below), which also overrides the
environment variable.
.PP
The device must be either a character special file or a
remote tape drive.  To use a tape drive on another machine as the
archive, use a filename that starts with `HOSTNAME:'.  The
hostname can be preceded by a username and an `@' to access the remote
tape drive as that user, if you have permission to do so (typically an
entry in that user's `~/.rhosts' file).
.PP
The available operations are listed below.  Unique abbreviations are
accepted.  Not all operations are available on all systems, or work on
all types of tape drives.
Some operations optionally take a repeat count, which can be given
after the operation name and defaults to 1.
.IP "eof, weof"
Write
.I count
EOF marks at current position.
.IP fsf
Forward space
.I count
files.
The tape is positioned on the first block of the next file.
.IP bsf
Backward space
.I count
files.
The tape is positioned on the first block of the next file.
.IP fsr
Forward space
.I count
records.
.IP bsr
Backward space
.I count
records.
.IP bsfm
Backward space
.I count
file marks.
The tape is positioned on the beginning-of-the-tape side of
the file mark.
.IP fsfm
Forward space
.I count
file marks.
The tape is positioned on the beginning-of-the-tape side of
the file mark.
.IP asf
Absolute space to file number
.IR count .
Equivalent to rewind followed by fsf
.IR count .
.IP eom
Space to the end of the recorded media on the tape
(for appending files onto tapes).
.IP rewind
Rewind the tape.
.IP "offline, rewoffl"
Rewind the tape and, if applicable, unload the tape.
.IP status
Print status information about the tape unit.
.IP retension
Rewind the tape, then wind it to the end of the reel,
then rewind it again.
.IP erase
Erase the tape.
.IP fss
(SCSI tapes) Forward space
.I count
setmarks.
.IP bss
(SCSI tapes) Backward space
.I count
setmarks.
.IP "wset"
(SCSI tapes) Write
.I count
setmarks at current position (only SCSI tape).
.IP "eod, seod"
Space to end of valid data.  Used on streamer tape
drives to append data to the logical and of tape.
.IP setblk
(SCSI tapes) Set the block size of the drive to
.I count
bytes per record.
.IP setdensity
(SCSI tapes) Set the tape density code to
.I count.
The proper codes to use with each drive should be looked up from the
drive documentation.
.IP drvbuffer
(SCSI tapes) Set the tape drive buffer code to
.I number.
The proper value for unbuffered operation is zero and "normal" buffered
operation one. The meanings of other values can be found in the drive
documentation or, in case of a SCSI-2 drive, from the SCSI-2 standard.
.IP stoptions
(SCSI tapes) Set the driver options bits to
.I count
for the device.
The bits can be set by oring the following values: 1 to enable write
buffering, 2 to enable asynchronous writes, 4 to enable read ahead,
8 to enable debugging output (if it has been compiled to the driver).
.IP stwrthreshold
(SCSI tapes) The write threshold for the tape device is set to
.I count
kilobytes. The value must be smaller than or equal to the driver
buffer size.
.IP seek
(SCSI tapes) Seek to the
.I count
block on the tape.  This operation is available on some
Tandberg and Wangtek streamers and some SCSI-2 tape drives.
.IP tell
(SCSI tapes) Tell the current block on tape.  This operation is available on some
Tandberg and Wangtek streamers and some SCSI-2 tape drives.
.IP densities
(SCSI tapes) Write explanation of some common density codes to
standard output.
.IP datcompression
(some SCSI-2 DAT tapes) Inquire or set the compression status
(on/off). If the
.I count
is one the compression status is printed. If the
.I count
is zero, compression is disabled. Otherwise, compression is
enabled. The command uses the SCSI ioctl to read and write the Data
Compression Characteristics mode page (15). ONLY ROOT CAN USE THIS
COMMAND.
.PP
.B mt
exits with a status of 0 if the operation succeeded, 1 if the
operation or device name given was invalid, or 2 if the operation
failed.
.SS OPTIONS
.TP
.I "\-f, \-\-file=device"
Use
.I device
as the file name of the tape drive to operate on.
To use a
tape drive on another machine, use a filename that
starts with `HOSTNAME:'.  The hostname can be preceded by a
username and an `@' to access the remote tape drive as that user, if
you have permission to do so (typically an entry in that user's
`~/.rhosts' file).
.TP
.I "\-\-rsh-command=command"
Notifies
.B mt
that it should use
.I command
to communicate with remote devices instead of
.I /usr/bin/ssh
or
.IR /usr/bin/rsh .
.TP
.I "\-V, \-\-version"
Print the version number of
.BR mt .