linux - mt (1)



NAME
       mt - control magnetic tape drive operation


SYNOPSIS
       mt [-f device] operation [count]


DESCRIPTION
       This  manual  page  documents the tape control program mt.
       mt performs the given operation, which must be one of  the
       tape  operations  listed below, on a tape drive.  The path
       of the tape device to operate on can be given with the  -f
       or  -t  option.  If neither of those options is given, and
       the environment variable TAPE is set, it is used.   Other-
       wise,    a    default   device   defined   in   the   file
       /usr/include/sys/mtio.h is used.  The device must a  char-
       acter special file.

       Some  operations optionally take a repeat count, which can
       be given after the operation name and defaults to 1.

       The available operations are listed below.  Unique  abbre-
       viations  are  accepted.  Not all operations are available
       on all systems, or work on all types of tape drives.

       fsf    Forward space count files.  The tape is  positioned
              on the first block of the next file.

       fsfm   Forward  space count files.  The tape is positioned
              on the last block of the previous file.

       bsf    Backward space count files.  The tape is positioned
              on the last block of the previous file.

       bsfm   Backward space count files.  The tape is positioned
              on the first block of the next file.

       fsr    Forward space count records.

       bsr    Backward space count records.

       fss    (SCSI tapes) Forward space count setmarks.

       bss    (SCSI tapes) Backward space count setmarks.

       weof   Write count EOF marks at current position.

       wset   (SCSI tapes) Write count setmarks at current  posi-
              tion (only SCSI tape).

       rewind Rewind the tape.

       offline, rewoffl
       status Print status information about the tape unit.

       retension
              Rewind the tape, then wind it to  the  end  of  the
              reel, then rewind it again.

       eod, seod
              Space  to end of valid data.  Used on streamer tape
              drives to append data to the logical and of tape.

       erase  Erase the tape.

       setblk (SCSI tapes) Set the block size  of  the  drive  to
              count bytes per record.

       setdensity
              (SCSI  tapes)  Set  the tape density code to count.
              The proper codes to use with each drive  should  be
              looked up from the drive documentation.

       drvbuffer
              (SCSI tapes) Set the tape drive buffer code to num-
              ber.  The proper value for unbuffered operation  is
              zero and "normal" buffered operation one. The mean-
              ings of other values can be found in the drive doc-
              umentation  or, in case of a SCSI-2 drive, from the
              SCSI-2 standard.

       stoptions
              (SCSI tapes) Set the driver options bits  to  count
              for  the  device.  The bits can be set by oring the
              following values: 1 to enable write buffering, 2 to
              enable asynchronous writes, 4 to enable read ahead,
              8 to enable debugging output (if it has  been  com-
              piled to the driver).

       stwrthreshold
              (SCSI  tapes)  The  write  threshold  for  the tape
              device is set to count kilobytes. The value must be
              smaller than or equal to the driver buffer size.

       seek   (SCSI  tapes)  Seek to the count block on the tape.
              This operation is available on  some  Tandberg  and
              Wangtek streamers and some SCSI-2 tape drives.

       tell   (SCSI  tapes) Tell the current block on tape.  This
              operation is available on some Tandberg and Wangtek
              streamers and some SCSI-2 tape drives.

       densities
              (SCSI  tapes) Write explanation of some common den-
              sity codes to standard output.

       datcompression
              (some SCSI-2 DAT tapes) Inquire or set the compres-
              sion  status  (on/off). If the count is omitted the
              compression status is  printed.  If  the  count  is
              zero,  compression  is  disabled.  If  the count is
              nonzero, compression is enabled. The  command  uses
              the  SCSI ioctl to read and write the Data Compres-
              sion Characteristics mode page (15). ONLY ROOT  CAN
              USE THIS COMMAND.

       mt  exits with a status of 0 if the operation succeeded, 1
       if the operation or device name given was invalid, or 2 if
       the operation failed.