
mt | 319
Linux
Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
mt
mt [option] operation [count] [arguments]
Control a magnetic tape drive used to back up or restore system
data. The version of the mt command documented here is mt-st,
which includes support for the st driver for SCSI tape devices. The
operation argument determines what action will be taken, and,
unless the -f or -t 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. Some operations take one
or more arguments other than a count, as noted in the descriptions
below.
Options
-f device, -t device
Name the tape device to use. This may be a local device, a
character special file (see mknod), or a remote device, named
in the format host:/path/to/drive or user@host:path/to/drive.
-h, --help
Print usage message and exit. -h prints a simple usage
message, while --help also prints a list of commands.
-V, --version
Print version number and exit. Also tells you if you are
running mt-st or the GNU version of mt.
Operations
mt can perform the following operations on tape drives. Opera-
tions applicable only to SCSI tape drives are marked as such.
asf n
Move to file number n on the tape. This is the same as
rewinding the tape ...