SUMMARY : bsf option of the mt command

From: Philippe Desmaison <desmaiso_at_iap.fr>
Date: Thu, 20 Apr 95 15:58:27 +0200

Hello OSF managers !!!!


My question was :

> I have problems with the mt command.
> When I write : mt -f /dev/nrmt4a fsf 1, it's OK. I go to the next tape Mark on
> my DAT tape.
> But, after the previous command, when I execute : mt -f /dev/nrmt4a bsf 1
> I am not at the same place... Why ? I should be on the previous tape mark ?
> My ksh script run correctly on a IBM AIX computer, but not on my OSF/1 3.0
> computers.


Many thanks to all who responded.

The answers were :

1) By Tim :
This is my understanging of how fsf/bsf work. It is based on a description of
the SCSI skip filemark cammand found in an Exabyte Hardware manual.

! represents a filemark
---- represents a file
^ represendts head position

Initial position:

  file 1 file 2 file 3
----------------- ! --------------------- ! ----------------------
                   ^
                 head

fsf 1: Head positioned to read next file

  file 1 file 2 file 3
----------------- ! --------------------- ! ----------------------
                                           ^
                                         head

now do bsf 1: Head rewound just past filemark but not past the corresponding file

  file 1 file 2 file 3
----------------- ! --------------------- ! ----------------------
                                         ^
                                       head

I expect what you need to do is
bsf 2 followed by fsf 1 that will have the following effect.

bsf 1:

  file 1 file 2 file 3
----------------- ! --------------------- ! ----------------------
                 ^
                head

fsf 1:

  file 1 file 2 file 3
----------------- ! --------------------- ! ----------------------
                   ^
                 head

This certainly fits with mt fsf/bsf on Ultrix and OSF/1

Tim.

2) By Dave :

Hi,

Doing an 'fsf' then 'bsf' does not return you to the same place on the tape -
you are now on the 'other side' of the first tape mark. Thus, doing a tape
read will return 'end-of-file' or similar, immediately.

After your 'bsf', do another 'fsf' to skip the tape mark, and all should
be OK.

Hope this helps,

  _Dave_


That 's all folks !!!!


Bye Bye.
Merci beaucoup !!!
Hello From Paris !!!


Philippe Desmaison.
Institut d'Astrophysique de Paris.
desmaiso_at_iap.fr
Received on Thu Apr 20 1995 - 09:57:07 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT