mt - Magnetic tape manipulating program
mt [-f tape_device] command [count]
program gives commands to a magnetic tape
Specifies the tape device to be manipulated.
If you do not specify a tape name with the -f option, the TAPE environment variable is used; if TAPE does not exist, mt uses the /dev/nrmt0h device. Note that tape_device must refer to a raw (not block) tape device. By default, mt performs the requested operation once. Operations can be performed more than once by specifying count.
The following commands are available. Only as many characters as are
required to uniquely identify a command need to be specified.
file marks at the
current position on the tape.
Rewinds the tape (count
Rewinds the tape and places the tape unit offline (count
Prepares a SCSI tape for removal from the device. Not all
SCSI tape drives support this functionality.
Bring a SCSI tape to the ready state if a tape is in the tape
path. Currently, this command is only supported in the SCSI/CAM tape driver.
Not all SCSI tape drives support this functionality.
Space to end of recorded data. Currently, this command is
only supported in the SCSI/CAM tape driver. Not all SCSI tape drives support
Prints status information about the tape unit.
Enables end-of-tape detection. When the end-of-tape markers
are reached, the tape is halted on the reel between the two end-of-tape markers.
Only the superuser can issue this command. The end-of-tape detection remains
in effect for the device until end-of-tape detection is disabled with the
command. This is the default mode after a system boot.
Disables end-of-tape detection. When the end of tape is reached,
the tape will run off the reel. Only the superuser can issue this command.
The end-of-tape detection remains disabled for the device until end-of-tape
detection is enabled with the
Retensions the tape by moving the tape one complete pass between
EOT and BOT.
Erases the tape.
Positions the tape to the specified SCSI logical block.
Positions the tape to the specified device-specific block.
Obtains the position of the tape and prints the information
retrieved from the device. There are three options for this command. The
short format of the SCSI
command is documented
in the SCSI-2 documentation. The long format is new for SCSI-3 devices.
Not all devices support device-specific addresses. The SCSI logical block
address or the device-specific address may be used as an argument to the
options include the following.
Only the first letter of any option is required.
Use the long format of the SCSI
command. This provides the tape position in the form of file number and SCSI
logical block address.
Use the short format of the SCSI
command. This provides the tape position in the form of a block address which
is an absolute SCSI logical block address. It also provides information about
the status of the tape drive's buffer cache. See the SCSI documentation for
details. This is the default in the absence of any option.
Use the short format of the SCSI
command and ask the device to return the device-specific address instead of
the SCSI logical block address.
command returns the following exit status:
Command was unrecognized.
Raw magnetic tape interface with no rewind when closed.
Raw magnetic tape interface with rewind when closed.