Technical data
mtio(7I) Ioctl Requests SunOS 5.5
mt −f /dev/rmt/0ln bsf 3
mt −f /dev/rmt/0ln fsf 1
dd if=/dev/rmt/0ln
To accomplish the same tape positioning in a C program, followed by a get status ioctl:
struct mtop mt_command;
struct mtget mt_status;
mt_command.mt_op = MTBSF;
mt_command.mt_count = 3;
ioctl(fd, MTIOCTOP, &mt_command);
mt_command.mt_op = MTFSF;
mt_command.mt_count = 1;
ioctl(fd, MTIOCTOP, &mt_command);
ioctl(fd, MTIOCGET, (char ∗)&mt_status);
or
mt_command.mt_op = MTNBSF;
mt_command.mt_count = 2;
ioctl(fd, MTIOCTOP, &mt_command);
ioctl(fd, MTIOCGET, (char ∗)&mt_status);
FILES /dev/rmt/<unit number><density>[<BSD behavior>][<no rewind>]
density l, m, h, u/c (low, medium, high, ultra/compressed,
respectively)
BSD behavior (optional) b
no rewind (optional) n
For example, /dev/rmt/0hbn specifies unit 0, highdensity,BSD behavior and no rewind.
SEE ALSO mt(1), tar(1), dd(1M), read(2), write(2), ar(4), st(7D)
1/4 Inch Tape Drive Tutorial
7I-222 modified 30 Aug 1995










