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.
asf
absolute space to count file number. This is equivalent to a
rewind followed by a fsf
count.
bsf
back space over count EOF characters. The tape is positioned on the beginning-of-tape side of the EOF character.
bsr
back space count records.
device
scan 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).
eof
write count EOF characters at the current position on the tape.
format
format the tape. Note that not all tape devices support this command.
fsf
forward space over count EOF characters. The tape is positioned on the first block of the file.
fsr
forward space count records.
nbs
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
.
weof
write count EOF characters at the current position on the tape.
eom
space to the end of recorded media on the tape. eom
is useful for appending files onto previously written tapes.
erase
erase the entire tape.
offline
rewind the tape and, if appropriate, take the drive unit off-line by unloading the tape.
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.
rewind
rewind the tape.
rewoffl
rewind the tape and, if appropriate, take the drive unit off-line by unloading the tape.
status
print status information about the tape unit.
tension
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.
mt
rewi
is valid, but
mt
rew
is ambiguous and not valid.
mt -f /dev/mt retension
0
Successful completion.
1
An error occurred or mt
was unable to open the
specified tape drive.
2
Command 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