Name

mt

Synopsis

                  mt [option] operation [count]

Control a magnetic tape drive used to back up or restore system data. The operation argument determines what action will be taken, and unless the -f or --file option is used, the action is applied to the default tape drive named in the TAPE environment variable. The count argument determines how many times the operation is to be repeated. If not specified, it defaults to 1.

Options

-f, --file=device

Name the tape device to use. This may be a local device, character special file (see mknod), or a remote device, named as host:/path/to/drive or user@host:path/to/drive.

--rsh-command= command

Choose a different command to use when connecting to a remote drive. The default is set in MT_RSH, and is normally either ssh or rsh.

-V, --version

Print version number and exit.

Operations

mt can perform the following operations on tape drives. Operations applicable only to SCSI tape drives are marked as such.

eof, weof n

Write n end-of-file (EOF) notations at the current location on the tape.

fsf n

Move forward n files, positioning the tape at the first block of the next file.

bsf n

Move backward n files, positioning the tape at the first block of the previous file.

fsr n

Move forward n records.

bsr n

Move backward n records.

bsfm n

Move backward n file marks, to a position on side of the file mark closer to the beginning of the tape.

fsfm n

Move forward n file marks, to a position on side of the file mark closer to the beginning of the tape.

asf n

Get Linux in a Nutshell, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.