The Ftape Installation and Usage Guide - Rewinding devices
When using the mt
program to send tape motion commands,
i.e. commands which alter the position of the tape R/W head relative to
the tape, it doesn't make any sense to use the auto-rewinding
devices. The reason is simple: `auto-rewinding
' means that the tape
is rewound when the tape device is closed. However, the tape device is
kept open at most for the life time of the program which has opened
it. This means
mt -f /dev/qft0 asf 1
will happily move the tape head to the first file mark, position on the
EOT side of that file mark (see MTFSF, see File marks) and then
the mt
program is finished. Which means that it closes the tape
device and as a result the tape is rewound because `/dev/qft0
' is
an auto-rewinding device (note the missing N
in front of the
`qft0
').
So you end up with a tape that is located at BOT, and not at the EOT
side of the first file mark. So, the following would be the correct
command. Note the N
in front of the device name.
mt -f /dev/nqft0 asf 1
Tape motion commands are available through the following MTIOCTOP
(see MTIOCTOP) ioctls. Only ioctls are listed that would move the
tape head away from BOT(1)
MTFSF |
MTBSF |
MTFSR |
MTBSR |
MTBSFM |
MTFSFM |
MTEOM |
MTSEEK |
(1) Obviously, when sending a tape command that causes a rewind operation itself it doesn't matter whether one uses the auto-rewinding or non-rewinding devices as in this case one ends up with the tape positioned at BOT anyway.
![]() |
Use these buttons to jump to the top menu |