Updated man page to document new behaviour of -Z, -z and -Q flags.
[unix-history] / gnu / usr.bin / cpio / mt.1
CommitLineData
60a17f4e
JH
1.TH MT 1L \" -*- nroff -*-
2.SH NAME
3mt \- control magnetic tape drive operation
4.SH SYNOPSIS
5.B mt
6[\-V] [\-f device] [\-\-file=device] [\-\-version]
7operation [count]
8.SH DESCRIPTION
9This manual page
10documents the GNU version of
11.BR mt .
12.B mt
13performs the given
14.IR operation ,
15which must be one of the tape operations listed below, on a tape
16drive.
17.PP
18The default tape device to operate on is taken from the file
19.I /usr/include/sys/mtio.h
20when
21.B mt
22is compiled. It can be overridden by giving a device file name in
23the environment variable
24.BR TAPE
25or by a command line option (see below), which also overrides the
26environment variable.
27.PP
28The device must be either a character special file or a
29remote tape drive. To use a tape drive on another machine as the
30archive, use a filename that starts with `HOSTNAME:'. The
31hostname can be preceded by a username and an `@' to access the remote
32tape drive as that user, if you have permission to do so (typically an
33entry in that user's `~/.rhosts' file).
34.PP
35The available operations are listed below. Unique abbreviations are
36accepted. Not all operations are available on all systems, or work on
37all types of tape drives.
38Some operations optionally take a repeat count, which can be given
39after the operation name and defaults to 1.
40.IP "eof, weof"
41Write
42.I count
43EOF marks at current position.
44.IP fsf
45Forward space
46.I count
47files.
48The tape is positioned on the first block of the next file.
49.IP bsf
50Backward space
51.I count
52files.
53The tape is positioned on the first block of the next file.
54.IP fsr
55Forward space
56.I count
57records.
58.IP bsr
59Backward space
60.I count
61records.
62.IP bsfm
63Backward space
64.I count
65file marks.
66The tape is positioned on the beginning-of-the-tape side of
67the file mark.
68.IP asf
69Absolute space to file number
70.IR count .
71Equivalent to rewind followed by fsf
72.IR count .
73.IP eom
74Space to the end of the recorded media on the tape
75(for appending files onto tapes).
76.IP rewind
77Rewind the tape.
78.IP "offline, rewoffl"
79Rewind the tape and, if applicable, unload the tape.
80.IP status
81Print status information about the tape unit.
82.IP retension
83Rewind the tape, then wind it to the end of the reel,
84then rewind it again.
85.IP erase
86Erase the tape.
87.PP
88.B mt
89exits with a status of 0 if the operation succeeded, 1 if the
90operation or device name given was invalid, or 2 if the operation
91failed.
92.SS OPTIONS
93.TP
94.I "\-f, \-\-file=device"
95Use
96.I device
97as the file name of the tape drive to operate on.
98To use a
99tape drive on another machine, use a filename that
100starts with `HOSTNAME:'. The hostname can be preceded by a
101username and an `@' to access the remote tape drive as that user, if
102you have permission to do so (typically an entry in that user's
103`~/.rhosts' file).
104.TP
105.I "\-V, \-\-version"
106Print the version number of
107.BR mt .