Blame doc/mt.1

Packit 1ef1a9
.\" This file is part of GNU cpio. -*- nroff -*-
Packit 1ef1a9
.\" Copyright 2014-2015 Free Software Foundation, Inc.
Packit 1ef1a9
.\"
Packit 1ef1a9
.\" GNU cpio is free software; you can redistribute it and/or modify
Packit 1ef1a9
.\" it under the terms of the GNU General Public License as published by
Packit 1ef1a9
.\" the Free Software Foundation; either version 3 of the License, or
Packit 1ef1a9
.\" (at your option) any later version.
Packit 1ef1a9
.\"
Packit 1ef1a9
.\" GNU cpio is distributed in the hope that it will be useful,
Packit 1ef1a9
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 1ef1a9
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 1ef1a9
.\" GNU General Public License for more details.
Packit 1ef1a9
.\"
Packit 1ef1a9
.\" You should have received a copy of the GNU General Public License
Packit 1ef1a9
.\" along with GNU cpio.  If not, see <http://www.gnu.org/licenses/>.
Packit 1ef1a9
.TH MT 1 "January 28, 2014" "MT" "GNU CPIO"
Packit 1ef1a9
.SH NAME
Packit 1ef1a9
mt \- control magnetic tape drive operation
Packit 1ef1a9
.SH SYNOPSIS
Packit 1ef1a9
.B mt
Packit 1ef1a9
[\fB\-V\fR] [\fB\-f\fR \fIdevice\fR] [\fB\-\-file=\fIdevice\fR] [\fB\-\-rsh-command=\fIcommand\fR] [\fB\-\-version\fR]
Packit 1ef1a9
\fIoperation\fR [\fIcount\fR]
Packit 1ef1a9
.SH DESCRIPTION
Packit 1ef1a9
This manual page
Packit 1ef1a9
documents the GNU version of
Packit 1ef1a9
.BR mt .
Packit 1ef1a9
.B mt
Packit 1ef1a9
performs the given
Packit 1ef1a9
.IR operation ,
Packit 1ef1a9
which must be one of the tape operations listed below, on a tape
Packit 1ef1a9
drive.
Packit 1ef1a9
.PP
Packit 1ef1a9
The default tape device to operate on is taken from the file
Packit 1ef1a9
.B /usr/include/sys/mtio.h
Packit 1ef1a9
when
Packit 1ef1a9
.B mt
Packit 1ef1a9
is compiled.  It can be overridden by giving a device file name in
Packit 1ef1a9
the environment variable
Packit 1ef1a9
.BR TAPE
Packit 1ef1a9
or by a command line option (see below), which also overrides the
Packit 1ef1a9
environment variable.
Packit 1ef1a9
.PP
Packit 1ef1a9
The device must be either a character special file or a
Packit 1ef1a9
remote tape drive.  To use a tape drive on another machine as the
Packit 1ef1a9
archive, use a filename that starts with `HOSTNAME:'.  The
Packit 1ef1a9
hostname can be preceded by a username and an `@' to access the remote
Packit 1ef1a9
tape drive as that user, if you have permission to do so (typically an
Packit 1ef1a9
entry in that user's `~/.rhosts' file).
Packit 1ef1a9
.PP
Packit 1ef1a9
The available operations are listed below.  Unique abbreviations are
Packit 1ef1a9
accepted.  Not all operations are available on all systems, or work on
Packit 1ef1a9
all types of tape drives.
Packit 1ef1a9
Some operations optionally take a repeat count, which can be given
Packit 1ef1a9
after the operation name and defaults to 1.
Packit 1ef1a9
.TP
Packit 1ef1a9
.BR eof ", " weof
Packit 1ef1a9
Write
Packit 1ef1a9
.I count
Packit 1ef1a9
EOF marks at current position.
Packit 1ef1a9
.TP 
Packit 1ef1a9
.B fsf
Packit 1ef1a9
Forward space
Packit 1ef1a9
.I count
Packit 1ef1a9
files.
Packit 1ef1a9
The tape is positioned on the first block of the next file.
Packit 1ef1a9
.TP 
Packit 1ef1a9
.B bsf
Packit 1ef1a9
Backward space
Packit 1ef1a9
.I count
Packit 1ef1a9
files.
Packit 1ef1a9
The tape is positioned on the first block of the next file.
Packit 1ef1a9
.TP 
Packit 1ef1a9
.B fsr
Packit 1ef1a9
Forward space
Packit 1ef1a9
.I count
Packit 1ef1a9
records.
Packit 1ef1a9
.TP 
Packit 1ef1a9
.B bsr
Packit 1ef1a9
Backward space
Packit 1ef1a9
.I count
Packit 1ef1a9
records.
Packit 1ef1a9
.TP 
Packit 1ef1a9
.B bsfm
Packit 1ef1a9
Backward space
Packit 1ef1a9
.I count
Packit 1ef1a9
file marks.
Packit 1ef1a9
The tape is positioned on the beginning-of-the-tape side of
Packit 1ef1a9
the file mark.
Packit 1ef1a9
.TP 
Packit 1ef1a9
.B fsfm
Packit 1ef1a9
Forward space
Packit 1ef1a9
.I count
Packit 1ef1a9
file marks.
Packit 1ef1a9
The tape is positioned on the beginning-of-the-tape side of
Packit 1ef1a9
the file mark.
Packit 1ef1a9
.TP 
Packit 1ef1a9
.B asf
Packit 1ef1a9
Absolute space to file number
Packit 1ef1a9
.IR count .
Packit 1ef1a9
Equivalent to rewind followed by fsf
Packit 1ef1a9
.IR count .
Packit 1ef1a9
.TP 
Packit 1ef1a9
.B seek
Packit 1ef1a9
Seek to block number
Packit 1ef1a9
.IR count .
Packit 1ef1a9
.TP 
Packit 1ef1a9
.B eom
Packit 1ef1a9
Space to the end of the recorded media on the tape
Packit 1ef1a9
(for appending files onto tapes).
Packit 1ef1a9
.TP 
Packit 1ef1a9
.B rewind
Packit 1ef1a9
Rewind the tape.
Packit 1ef1a9
.TP 
Packit 1ef1a9
.BR offline ", " rewoffl
Packit 1ef1a9
Rewind the tape and, if applicable, unload the tape.
Packit 1ef1a9
.TP 
Packit 1ef1a9
.B status
Packit 1ef1a9
Print status information about the tape unit.
Packit 1ef1a9
.TP 
Packit 1ef1a9
.B retension
Packit 1ef1a9
Rewind the tape, then wind it to the end of the reel,
Packit 1ef1a9
then rewind it again.
Packit 1ef1a9
.TP 
Packit 1ef1a9
.B erase
Packit 1ef1a9
Erase the tape.
Packit 1ef1a9
.PP
Packit 1ef1a9
.B mt
Packit 1ef1a9
exits with a status of 0 if the operation succeeded, 1 if the
Packit 1ef1a9
operation or device name given was invalid, or 2 if the operation
Packit 1ef1a9
failed.
Packit 1ef1a9
.SS OPTIONS
Packit 1ef1a9
.TP
Packit 1ef1a9
\fB\-f\fR, \fB\-\-file=\fIdevice\fR
Packit 1ef1a9
Use
Packit 1ef1a9
.I device
Packit 1ef1a9
as the file name of the tape drive to operate on.
Packit 1ef1a9
To use a
Packit 1ef1a9
tape drive on another machine, use a filename that
Packit 1ef1a9
starts with `HOSTNAME:'.  The hostname can be preceded by a
Packit 1ef1a9
username and an `@' to access the remote tape drive as that user, if
Packit 1ef1a9
you have permission to do so (typically an entry in that user's
Packit 1ef1a9
`~/.rhosts' file).
Packit 1ef1a9
.TP
Packit 1ef1a9
\fB\-\-rsh-command=\fIcommand\fR
Packit 1ef1a9
Notifies
Packit 1ef1a9
.B mt
Packit 1ef1a9
that it should use
Packit 1ef1a9
.I command
Packit 1ef1a9
to communicate with remote devices instead of
Packit 1ef1a9
.B /usr/bin/ssh
Packit 1ef1a9
or
Packit 1ef1a9
.BR /usr/bin/rsh .
Packit 1ef1a9
.TP
Packit 1ef1a9
\fB\-V\fR, \fB\-\-version\fR
Packit 1ef1a9
Print the version number of
Packit 1ef1a9
.BR mt .
Packit 1ef1a9
.SH "BUG REPORTS"
Packit 1ef1a9
Report bugs to <bug\-cpio@gnu.org>.
Packit 1ef1a9
.SH COPYRIGHT
Packit 1ef1a9
Copyright \(co 2014 Free Software Foundation, Inc.
Packit 1ef1a9
.br
Packit 1ef1a9
.na
Packit 1ef1a9
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
Packit 1ef1a9
.br
Packit 1ef1a9
.ad
Packit 1ef1a9
This is free software: you are free to change and redistribute it.
Packit 1ef1a9
There is NO WARRANTY, to the extent permitted by law.
Packit 1ef1a9
.\" Local variables:
Packit 1ef1a9
.\" eval: (add-hook 'write-file-hooks 'time-stamp)
Packit 1ef1a9
.\" time-stamp-start: ".TH [A-Z_][A-Z0-9_.\\-]* [0-9] \""
Packit 1ef1a9
.\" time-stamp-format: "%:B %:d, %:y"
Packit 1ef1a9
.\" time-stamp-end: "\""
Packit 1ef1a9
.\" time-stamp-line-limit: 20
Packit 1ef1a9
.\" end:
Packit 1ef1a9