[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    mt(1) manual page Table of Contents

Name

mt - magnetic tape control

Synopsis

mt [ -f tapename ] command... [ count ]

Availability

SUNWcsu

Description

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/rmt/0. 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.

mt Commands

eof, weof
Write count EOF marks at the current position on the tape.
fsf
Forward space over count EOF marks. The tape is positioned on the first block of the file.
fsr
Forward space count records.
bsf
Back space over count EOF marks. The tape is positioned on the beginning-of-tape side of the EOF mark.
bsr
Back space count records.
nbsf
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.
asf
Absolute space to count file number. This is equivalent to a rewind followed by a fsf count.

For the following commands, count is ignored:

eom
Space to the end of recorded media on the tape. This is useful for appending files onto previously written tapes.
rewind
Rewind the tape.
offline, rewoffl
Rewind the tape and, if appropriate, take the drive unit off-line by unloading the tape. It cycles through all four tapes.
status
Print status information about the tape unit.
retension
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
Erase the entire tape.

Files

/dev/rmt/*
magnetic tape interface

/dev/rmt/*b

/dev/rmt/*bn

/dev/rmt/*c

/dev/rmt/*cb

/dev/rmt/*cbn

/dev/rmt/*cn

/dev/rmt/*h

/dev/rmt/*hb

/dev/rmt/*hbn

/dev/rmt/*hn

/dev/rmt/*l

/dev/rmt/*lb

/dev/rmt/*lbn

/dev/rmt/*ln

/dev/rmt/*m

/dev/rmt/*mb

/dev/rmt/*mbn

/dev/rmt/*mn

/dev/rmt/*n

/dev/rmt/*u

/dev/rmt/*ub

/dev/rmt/*ubn

/dev/rmt/*un

See Also

tar(1) , tcopy(1) , ar(4) , environ(4) , mtio(7I) , st(7D)

Bugs

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, Sun3 to Sun4 or visa versa) is not supported.


Table of Contents