up | Inhaltsverzeichniss | Kommentar

Manual page for MT(1)

mt - magnetic tape control


mt [ -f tapename ] command [ count ]


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 refers to a raw 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.


eof, weof
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.

For the following commands, count is ignored:

Space to the end of recorded media on the tape. This is useful for appending files onto previously written tapes.
Rewind the tape.
offline, rewoffl
Rewind the tape and, if appropriate, take the drive unit off-line by unloading the tape.
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.
Erase the entire tape.


magnetic tape interface
Archive cartridge tape interface
SCSI tape interface


ar.4s mtio.4 st.4s tm.4s xt.4s environ.5v


Not all devices support all options. Some options are hardware-dependent. Refer to the corresponding device manual page.


The bsf option for SCSI tape in SunOS 4.0.3 is incompatible with this release and releases prior to 4.0.3.

index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).

Last modified 21/April/97