Index Index for Section 1
Index Alphabetical listing for M

mt(1)

NAME

mt - Magnetic tape manipulating program

SYNOPSIS

mt [-f tape_device] command [count] The mt program gives commands to a magnetic tape drive.

OPTIONS

-f tape_device Specifies the tape device to be manipulated.

DESCRIPTION

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. eof, weof Writes count file marks at the current position on the tape. fsf Forward spaces count files. fsr Forward spaces count records. bsf Backspaces count files. bsr Backspaces count records. rewind Rewinds the tape (count is ignored). offline, rewoffl Rewinds the tape and places the tape unit offline (count is ignored). unload Prepares a SCSI tape for removal from the device. Not all SCSI tape drives support this functionality. online, load 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. seod Space to end of recorded data. Currently, this command is only supported in the SCSI/CAM tape driver. Not all SCSI tape drives support this functionality. status Prints status information about the tape unit. eoten 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 eotdis command. This is the default mode after a system boot. eotdis 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 eoten command. retension Retensions the tape by moving the tape one complete pass between EOT and BOT. erase Erases the tape. seek Positions the tape to the specified SCSI logical block. seekds Positions the tape to the specified device-specific block. rdpos 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 READ POSITION 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 seek and seekds commands. The rdpos options include the following. Only the first letter of any option is required. l[ong] Use the long format of the SCSI READ POSITION command. This provides the tape position in the form of file number and SCSI logical block address. s[hort] Use the short format of the SCSI READ POSITION 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. d[evspec] Use the short format of the SCSI READ POSITION command and ask the device to return the device-specific address instead of the SCSI logical block address.

EXIT STATUS

The mt command returns the following exit status: 0 (Zero) Success. 1 Command was unrecognized. 2 Operation failed.

FILES

/dev/nrmt* Raw magnetic tape interface with no rewind when closed. /dev/rmt* Raw magnetic tape interface with rewind when closed.

SEE ALSO

Commands: dd(1) Functions: ioctl(2)