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
|
.\" This file is part of GNU cpio. -*- nroff -*-
.\" Copyright 2014-2015, 2017 Free Software Foundation, Inc.
.\"
.\" GNU cpio is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 3 of the License, or
.\" (at your option) any later version.
.\"
.\" GNU cpio is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with GNU cpio. If not, see <http://www.gnu.org/licenses/>.
.TH MT 1 "January 28, 2014" "MT" "GNU CPIO"
.SH NAME
mt \- control magnetic tape drive operation
.SH SYNOPSIS
.B mt
[\fB\-V\fR] [\fB\-f\fR \fIdevice\fR] [\fB\-\-file=\fIdevice\fR] [\fB\-\-rsh-command=\fIcommand\fR] [\fB\-\-version\fR]
\fIoperation\fR [\fIcount\fR]
.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
.B /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.
.TP
.BR eof ", " weof
Write
.I count
EOF marks at current position.
.TP
.B fsf
Forward space
.I count
files.
The tape is positioned on the first block of the next file.
.TP
.B bsf
Backward space
.I count
files.
The tape is positioned on the first block of the next file.
.TP
.B fsr
Forward space
.I count
records.
.TP
.B bsr
Backward space
.I count
records.
.TP
.B bsfm
Backward space
.I count
file marks.
The tape is positioned on the beginning-of-the-tape side of
the file mark.
.TP
.B fsfm
Forward space
.I count
file marks.
The tape is positioned on the beginning-of-the-tape side of
the file mark.
.TP
.B asf
Absolute space to file number
.IR count .
Equivalent to rewind followed by fsf
.IR count .
.TP
.B seek
Seek to block number
.IR count .
.TP
.B eom
Space to the end of the recorded media on the tape
(for appending files onto tapes).
.TP
.B rewind
Rewind the tape.
.TP
.BR offline ", " rewoffl
Rewind the tape and, if applicable, unload the tape.
.TP
.B status
Print status information about the tape unit.
.TP
.B retension
Rewind the tape, then wind it to the end of the reel,
then rewind it again.
.TP
.B erase
Perform long erase of tape. If
.I count
is 0, perform short erase of tape (some devices do not support this).
.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
\fB\-f\fR, \fB\-\-file=\fIdevice\fR
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
\fB\-\-rsh-command=\fIcommand\fR
Notifies
.B mt
that it should use
.I command
to communicate with remote devices instead of
.B /usr/bin/ssh
or
.BR /usr/bin/rsh .
.TP
\fB\-V\fR, \fB\-\-version\fR
Print the version number of
.BR mt .
.SH "BUG REPORTS"
Report bugs to <bug\-cpio@gnu.org>.
.SH COPYRIGHT
Copyright \(co 2014 Free Software Foundation, Inc.
.br
.na
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
.br
.ad
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.\" Local variables:
.\" eval: (add-hook 'write-file-hooks 'time-stamp)
.\" time-stamp-start: ".TH [A-Z_][A-Z0-9_.\\-]* [0-9] \""
.\" time-stamp-format: "%:B %:d, %:y"
.\" time-stamp-end: "\""
.\" time-stamp-line-limit: 20
.\" end:
|