The mt utility sends commands to a magnetic tape drive. If -f tapename is not specified, the environment variable TAPE is used. If TAPE does not exist, mt uses the device /dev/rmt/0n.
The following operands are supported:
The number of times that the requested operation is to be performed. By default, mt performs command once. Multiple operations of command may be performed by specifying count.
Write count EOF marks at the current position on the tape.
Forward space over count EOF marks. The tape is positioned on the first block of the file.
Forward space count records.
Back space over count EOF marks. The tape is positioned on the beginning-of-tape side of the EOF mark.
Back space count records.
Back space count files. The tape is positioned on the first block of the file. This is equivalent to count+1 bsf's followed by one fsf.
Absolute space to count file number. This is equivalent to a rewind followed by a fsf count.
If count is specified with any of the following commands, the count is ignored and the command is performed only once.
Space to the end of recorded media on the tape. This is useful for appending files onto previously written tapes.
Rewind the tape.
Rewind the tape and, if appropriate, take the drive unit off-line by unloading the tape. It cycles through all four tapes.
Print status information about the tape unit.
Rewind the cartridge tape completely, then wind it forward to the end of the reel and back to beginning-of-tape to smooth out tape tension.
Allow the tape drive to remain reserved after closing the device. The drive must then be explicitly released.
Re-establish the default behavior of releasing at close.
Break the reservation of the tape drive held by another host and then reserve the tape drive. This command can be executed only with super-user privileges.
Erase the entire tape. Erasing a tape may take a long time depending on the device and/or tape. Refer to the device specific manual for time details.
All operations were successful.
Command was unrecognized or mt was unable to open the specified tape drive.
An operation failed.
See attributes(5) for descriptions of the following attributes:
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|
Not all devices support all options. Some options are hardware-dependent. Refer to the corresponding device manual page.
mt is architecture sensitive. Heterogeneous operation (that is, SPARC to IA or the reverse) is not supported.