Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dd(1)

tar(1)

ioctl(2)

mtio(4)

tms(4)

environ(7)

mt(1)

NAME

mt − magnetic tape manipulating program

SYNTAX

mt [−f tapename] command [count]

DESCRIPTION

The mt command permits the operation of a magnetic tape drive.

OPTIONS

The −f flag option uses the specified tape device (next argument) in place of either that tape device defined by your TAPE environment variable (.login or .prifile) or /dev/nrmtoh. 

Some operations may be performed multiple times by specifying count. By default, mt performs the requested operation once.

The command argument defines the operation to be performed.  Only as many characters as are required to uniquely identify a command need be specified. 

The following is a list of commands:

bsfBackspace count files. 

bsrBackspace count records. 

cacheAllows mt to use the cache buffer on a tape drive that has the cache buffer feature.

clhrdsfClear hardware/software problem.  Works with tape drives which use the TMSCP tape controller interface tms(.). This command is restricted to root access only.

clserexClear serious exception.  Works with tape drives which use the TMSCP tape controller interface tms(.).

clsubClear subsystem.  Works with tape drives which use the TMSCP tape controller interface tms(.). This command is restricted to root access only.

eof, weofWrite count end-of-file marks at the current position on the tape. 

eotdisDisable 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 command remains in effect for the device until end-of-tape detection is enabled with the eoten command. 

eotenEnable 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 command 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. 

fsfForward-space count files. 

fsrForward-space count records. 

nocacheDisables the use of the cache buffer for any tape drive that has the cache buffer feature. 

offline, rewofflRewind the tape and place the tape unit off-line. 

rewindRewind the tape. 

statusPrint status information about the tape unit. 

EXAMPLES

This example shows how to rewind the tape rmt0l:

mt -f /dev/rmt0l rewind

This example shows how to backspace the tape nmt1h three files:

mt -f /dev/nrmt1h bsf 3

This example shows how to write two end-of-file marks at the current position on tape nmt6h:

mt -f /dev/nrmt6h eof 2

RETURN VALUE

In shell scripts, mt returns a 0 exit status when the operation(s) were successful, 1 if the command was unrecognized, and 2 if an operation failed.

FILES

/dev/rmt?h or /dev/rmt?l
Raw magnetic tape interface with rewind when closed

/dev/nmt?h or /dev/nmt?l
Raw magnetic tape interface with no rewind when closed

SEE ALSO

dd(1), tar(1), ioctl(2), mtio(4), tms(4), environ(7)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026