phpman > man > MT(1)

Markdown | JSON | MCP    

TLDR: MT (tldr-pages)

Control magnetic tape drive operation (commonly LTO tape).

  • Check the status of a tape drive
    mt -f {{/dev/nstX}} status
  • Rewind the tape to beginning
    mt -f {{/dev/nstX}} rewind
  • Move forward a given files, then position the tape on first block of next file
    mt -f {{/dev/nstX}} fsf {{count}}
  • Rewind the tape, then position the tape at beginning of the given file
    mt -f {{/dev/nstX}} asf {{count}}
  • Position the tape at the end of valid data
    mt -f {{/dev/nstX}} eod
  • Rewind the tape and unload/eject it
    mt -f {{/dev/nstX}} eject
  • Write EOF (End-of-file) mark at the current position
    mt -f {{/dev/nstX}} eof
MT(1)                                         GNU CPIO                                         MT(1)



NAME
       mt - control magnetic tape drive operation

SYNOPSIS
       mt [-V] [-f device] [--file=device] [--rsh-command=command] [--version] operation [count]

DESCRIPTION
       This  manual  page  documents  the GNU version of mt.  mt performs the given operation, which
       must be one of the tape operations listed below, on a tape drive.

       The default tape device to operate on is taken from the file /usr/include/sys/mtio.h when  mt
       is  compiled.   It can be overridden by giving a device file name in the environment variable
       TAPE or by a command line option (see below), which also overrides the environment variable.

       The device must be either a character special file or a remote tape drive.   To  use  a  tape
       drive  on  another  machine as the archive, use a filename that starts with `HOSTNAME:'.  The
       hostname can be preceded by a username and an `@' to access the remote  tape  drive  as  that
       user, if you have permission to do so (typically an entry in that user's `~/.rhosts' file).

       The available operations are listed below.  Unique abbreviations are accepted.  Not all oper‐
       ations are available on all systems, or work on all types of tape  drives.   Some  operations
       optionally  take  a repeat count, which can be given after the operation name and defaults to
       1.

       eof, weof
              Write count EOF marks at current position.

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

       bsf    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.

       bsfm   Backward space count file marks.  The tape is positioned on the  beginning-of-the-tape
              side of the file mark.

       fsfm   Forward  space  count file marks.  The tape is positioned on the beginning-of-the-tape
              side of the file mark.

       asf    Absolute space to file number count.  Equivalent to rewind followed by fsf count.

       seek   Seek to block number count.

       eom    Space to the end of the recorded media on the tape (for appending files onto tapes).

       rewind Rewind the tape.

       offline, rewoffl
              Rewind the tape and, if applicable, unload the tape.

       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.

       erase  Perform long erase of tape. If count is 0, perform short erase of tape  (some  devices
              do not support this).

       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.

   OPTIONS
       -f, --file=device
              Use device as the file name of the tape drive to operate on.  To use a tape  drive  on
              another  machine,  use  a  filename that starts with `HOSTNAME:'.  The hostname can be
              preceded by a username and an `@' to access the remote tape drive as that user, if you
              have permission to do so (typically an entry in that user's `~/.rhosts' file).

       --rsh-command=command
              Notifies  mt  that it should use command to communicate with remote devices instead of
              /usr/bin/ssh or /usr/bin/rsh.

       -V, --version
              Print the version number of mt.

BUG REPORTS
       Report bugs to <bug-cpio AT gnu.org>.

COPYRIGHT
       Copyright © 2014 Free Software Foundation, Inc.
       License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
       This is free software: you are free to change and redistribute it.  There is NO WARRANTY,  to
       the extent permitted by law.




MT                                        January 28, 2014                                     MT(1)
MT(1)
NAME SYNOPSIS DESCRIPTION
retension -f, --file=device -V, --version
BUG REPORTS COPYRIGHT

Generated by phpman local Author: Che Dong Under GNU General Public License
2026-06-15 06:44 @216.73.216.200
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 TransitionalValid CSS!

^_back to top