mt(1)

mt(1)

NAME

 

mt - magnetic tape manipulating program

 

SYNOPSIS

 

mt [-ftapename ] command [ count ]

 

Obsolescent

 

mt [-ttapename ] command [ count ]

 

DESCRIPTION

mt is used to give commands to the tape drive. If tapename is not speci®ed, the environment variable TAPE is used; if TAPE is not de®ned, the default drive is used.

mt winds the tape in the requested direction (forward or backward), stopping after the speci®ed count EOF marks or records are passed. If count is not speci®ed, one is assumed. Each EOF mark counts as one record. When winding backwards, the tape always stops at the BOT marker, regardless of the number remaining in count.

mt accepts the following commands:

eof Write count EOF marks.

fsf Forward space count ®les.

fsr Forward space count records.

bsf Backward space count ®les.

bsr Backward space count records.

rew Rewind tape.

offl Rewind tape and go of¯ine.

eod Seek to end of data (DDS and QIC drives only).

smk Write count setmarks (DDS drives only).

fss Forward space count setmarks (DDS drives only).

bss Backward space count setmarks (DDS drives only). status Print status information about the tape drive.

res Reserve tape drive for sole use by the host issuing the mt command (stape driver only).

rel Release tape drive from sole use by the host issuing the mt command (stape driver only).

Spacing operations (back or forward space ®le or record) leave the tape positioned past the object being spaced to in the direction of motion. That is, backspacing a ®le leaves the the tape positioned before the ®le mark, forward spacing a ®le leaves the tape positioned after the ®le mark. This is consistent with all classical usage on tapes.

WARNINGS

Only raw, no-rewind Berkeley-type devices should be speci®ed. This type of device will not reposition the tape upon close. An example of such a device is /dev/rmt/0mnb. Please refer to mt(7) for more details.

It is possible to wind the tape beyond the EOT marker and off the end of the reel.

A reservation may only be cleared with a release by the host that issued the original reserve. In the event that the host that holds the reservation is no longer available, the st command may be used to reclaim the device by issuing a bus device reset. Refer to st(1M) for more details.

The reserve/release functionality can only be issued to drives using the stape driver.

EXAMPLES

Rewind the tape associated with the device ®le /dev/rmt/0mnb:

mt -f /dev/rmt/0mnb rew

FILES

/dev/rmt/* Raw magnetic tape interface

HP-UX Release 11i: December 2000

− 1 −

Section 1551

m