mt(1)
NAME
mt − magnetic tape manipulating program
SYNOPSIS
mt [ −f tapename ] command [ modifier ]
DESCRIPTION
mt is used to give commands to a magnetic tape drive. If a tape name is not specified, the environment variable TAPE is used; if TAPE does not exist, mt uses the device /dev/rmt/0ms. Note that tapename must reference a raw (not block) tape device. By default mt performs the requested operation once. Operations may be performed multiple times by specifying a number as modifier.
The available commands are listed below. Only as many characters as are required to uniquely identify a command need be specified.
eof, weof
Write modifier end-of-file marks at the current position on the tape.
fsf Forward space modifier files.
fsr Forward space modifier records.
bsf Back space modifier files.
bsr Back space modifier records.
rewind
Rewind the tape (Modifier is ignored.)
offline, rewoffl
Rewind the tape and place the tape unit off-line (Modifier is ignored.)
settype
Change the drive type to modifier. A list of possible drive types is in <sys/mtio.h>. Drive types for the settype command must be spelled out completely.
status
Print status information about the tape unit.
retension
Retension the cartridge tape unit.
erase Erase the tape from the current tape position to end of tape. Tape will be positioned at beginning of tape on completion of this command.
wind Position the tape at the end of valid data to allow write appends.
unit (This command is implemented only on the Model TC4980 drives). Sets modifier to be the active Logical Unit for subsequent operations.
mt returns a 0 exit status when the operation(s) were successful, 1 if the command was unrecognized, and 2 if an operation failed.
Note: When using the spacing commands, the location that the tape head is left at command completion is device specific. Please see the gt(7) man page for more details.
FILES
/dev/rmt/∗Raw magnetic tape interface
SEE ALSO
CX/UX User’s Reference Manual