MT(1) BSD Reference Manual MT(1)NAMEmt - magnetic tape manipulating program
SYNOPSISmt [-f tapename] command [count | length]
DESCRIPTION
Mt is used to give commands to a magnetic tape drive.
For commands with associated counts, operations may be performed multiple
times by specifying a count. By default, mt performs the requested opera-
tion once.
The tapename argument must reference a raw (not block) tape device.
The available commands are listed below. Only as many characters as are
required to uniquely identify a command need be specified.
blocksize Set block length for fixed length records. If no length is
specified the current value will be reported. This command is
only useful on Exabyte and DDS (dat data storage) SCSI drives.
bsf Back space count files.
bsr Back space count records.
buffered Enable data buffering in the physical tape drive. When data
buffering is enabled, and the physical end of media is detect-
ed, the drive may be unable to write all the buffered data to
physical media. Few programs count on end of media detection,
so this is unlikely to be a problem. Currently only SCSI tape
drives are affected by this command. This command updates
NVRAM in the physical tape drive, and is therefore very
sticky, even across a reboot or power cycle.
eof, weof Write count end-of-file marks at the current position on the
tape.
fsf Forward space count files.
fsr Forward space count records.
offline, rewoffl
Rewind the tape and place the tape unit off-line. The count
argument is ignored.
rewind Rewind the tape. The count argument is ignored.
status Print status information about the tape unit. The count argu-
ment is ignored.
unbuffered
Disable data buffering in the physical tape drive. Currently
only SCSI tape drives are affected by this command. This com-
mand updates NVRAM in the physical tape drive, and is there-
fore sticky even across a reboot or power cycle.
eof, weof
If a tape name is not specified, and the environment variable TAPE does
not exist; mt uses the device /dev/nrst0.
Mt returns a 0 exit status when the operation(s) were successful, 1 if
the command was unrecognized, and 2 if an operation failed.
ENVIRONMENT
If the following environment variable exists, it is utilized by mt.
TAPE Mt checks the TAPE environment variable if the argument
tapename is not given.
FILES
/dev/rst* SCSI tape devices.
/dev/nrst* No-rewind SCSI tape devices.
SEE ALSOdd(1), ioctl(2), st(4), environ(7)BUGS
The stickiness of buffered and unbuffered could lead to unexpected behav-
ior if mt is not always used to set the drive in the expected mode.
The wt(4) driver does not pay attention to buffered or unbuffered and al-
ways run in buffered mode.
HISTORY
The mt command appeared in 4.3BSD.
4th Berkeley Distribution June 6, 1993 2