O'Reilly logo

Linux in a Nutshell, Fourth Edition by Aaron Weber, Stephen Figgins, Ellen Siever

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required