mtmagnetic tape control |
Command |
mt
[-f tapename]
command
[count]
mt issues commands to an SCSI magnetic tape drive.
If you do not specify tapename, mt attempts to use
the contents of the TAPE environment variable as a
tape device name. If you do not specify tapename or define the
TAPE environment variable, mt
uses a default device name of /dev/mt (the first tape drive found,
in buffered mode, with automatic rewind after a tape operation).
By default, mt performs the requested operation once; by
specifying count, mt can perform multiple operations.
mt accepts.
You must specify only as many characters of a command as necessary to uniquely
identify it. The commands in this section accept input from count.
asfabsolute space to count file number. This is equivalent to a
rewind followed by a fsf count.
bsfback space over count EOF characters. The tape is positioned on the beginning-of-tape side of the EOF character.
bsrback space count records.
devicescan the system for SCSI host adapters, and lists the devices. count specifies the type of the device to list:
0 Disk drive 1 Tape drive 2 Printer 3 Processor 4 WORM 5 CD-ROM 6 Scanner 7 Optical 8 Medium changer 9 Communications 99 All devices
The default is 1 (list all tape drives).
eofwrite count EOF characters at the current position on the tape.
formatformat the tape. Note that not all tape devices support this command.
fsfforward space over count EOF characters. The tape is positioned on the first block of the file.
fsrforward space count records.
nbsback 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.
weofwrite count EOF characters at the current position on the tape.
eomspace to the end of recorded media on the tape. eom
is useful for appending files onto previously written tapes.
eraseerase the entire tape.
offlinerewind the tape and, if appropriate, take the drive unit off-line by unloading the tape.
retensionrewind 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.
rewindrewind the tape.
rewofflrewind the tape and, if appropriate, take the drive unit off-line by unloading the tape.
statusprint status information about the tape unit.
tensionrewind 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.
mt rewi is valid, but
mt rew is ambiguous and not valid.
mt -f /dev/mt retension
0Successful completion.
1An error occurred or mt was unable to open the
specified tape drive.
2Command was unrecognized.
/dev/*mt* Tape devices (see
tape).
mt functions with tape drives connected to a SCSI controller
which supports the Advanced SCSI Programming Interface (ASPI), as defined by the
Adaptec (TM) Corporation, such as the Adaptec (TM) 1542B SCSI adapter. MKS does
not supply the ASPI driver, since the implementation of an ASPI driver is
hardware dependent.
See tape for a description of the valid SCSI tape device names.
tape