[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.5.2 The mt Utility

(This message will disappear, once this node revised.)

See Is it true that this only works on non-block devices? should explain the difference, (fixed or variable).

See section The Blocking Factor of an Archive.

You can use the mt utility to advance or rewind a tape past a specified number of archive files on the tape. This will allow you to move to the beginning of an archive before extracting or reading it, or to the end of all the archives before writing a new one. See Why isn't there an "advance 'til you find two tape marks together"?

The syntax of the mt command is:

mt [-f tapename] operation [number]

where tapename is the name of the tape device, number is the number of times an operation is performed (with a default of one), and operation is one of the following:

See is there any use for record operations?


Writes number tape marks at the current position on the tape.


Moves tape position forward number files.


Moves tape position back number files.


Rewinds the tape. (Ignores number.)


Rewinds the tape and takes the tape device off-line. (Ignores number.)


Prints status information about the tape unit.

If you don't specify a tapename, mt uses the environment variable TAPE; if TAPE is not set, mt will use the default device specified in your `sys/mtio.h' file (DEFTAPE variable). If this is not defined, the program will display a descriptive error message and exit with code 1.

mt returns a 0 exit status when the operation(s) were successful, 1 if the command was unrecognized, and 2 if an operation failed.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Sergey Poznyakoff on December, 17 2017 using texi2html 1.76.