MT(1) — USER COMMANDS
NAME
mt − magnetic tape control
SYNOPSIS
mt [ −f tapename ] command [ count ]
DESCRIPTION
mt sends commands to a magnetic tape drive. If tapename is not specified, the environment variable TAPE is used. If TAPE does not exist, mt uses the device /dev/rmt12. tapename must refer to a raw (not block) tape device. By default, mt performs the requested operation once; multiple operations may be performed by specifying count.
The available commands are listed below. Only as many characters as are required to uniquely identify a command need be specified.
mt returns a 0 exit status when the operation(s) were successful, 1 if the command was unrecognized or if mt was unable to open the specified tape drive, and 2 if an operation failed.
OPTIONS
eof, weof Write count EOF marks at the current position on the tape.
fsf Forward space count files. The tape is positioned on the first block of the file.
fsr Forward space count records.
bsf Back space count files. The tape is positioned on the first block of the file.
bsr Back space count records.
bsfm Back space count file marks. The tape is positioned on the beginning−of−tape side of the file mark.
asf Absolute space to count file number. This is equivalent to a rewind followed by a fsf count.
For the following commands, count is ignored:
eom Space to the end of recorded media on the tape (SCSI only). This is useful for appending files onto previously written tapes.
rewind Rewind the tape.
offline, rewoffl
Rewind the tape and, if appropriate, take the drive unit offline by unloading the tape.
status Print status information about the tape unit.
retension Rewind the tape completely, then wind it forward to the end of the reel and back to beginning−of−tape to smooth out tape tension.
erase Erase the entire tape.
FILES
/dev/rmt∗ raw magnetic tape interface
/dev/rar∗ raw Archive cartridge tape interface
/dev/rst∗ raw SCSI tape interface
/dev/rmt∗ raw Xylogics tape interface
SEE ALSO
ar(4S), mtio(4), st(4S), tm(4S), xt(4S) environ(5V)
BUGS
Not all devices support all options, in particular retension and bsfm. For example, ar(4S) currently does not support the fsr, bsf, or bsr options. The half-inch tape driver, /dev/rmt∗, does not support the retension option.
Sun Release 4.0 — Last change: 25 March 1989