SUMMARY: Tape block sizes

From: Sheldon Lee Wen <sheldon.leewen_at_cgi.com>
Date: Mon, 19 Aug 2002 08:59:44 -0400

My thanks for this go to Joerg Bruehe, Neil McCoy, Dr. Thomas Blinna and
Alan Nabeth.


Neil Replied:

The command:

   tcopy device_name

will work. The first file on the tape will be file 0, then file 1, etc.

##################

Alan Replied with:

Read the record with a legal transfer size for the device
        and interface that is large enough to fit the entire
        record. UNIX tape semantics will report the actual
        record size. So, if you think that 1 MB is larger than
        what you're ever likely to see and that also happens
        to be a valid size for the device, read that much and
        see how many bytes were actually read.

#################

The good doctor wrote:

There is a utility called "tapex" that is part of the "System
Exercisers" optional software subset. It has a reference page. One
thing you can ask it to do is read a tape (start to end) and tell you
the record sizes and record counts. The "-m" option requests this.
Other than reading the tape and counting the bytes in each record, there
is no way; there is not even a rule that each record except the last be
the same size; it is just a convention that many programs write to tape
with a fixed block size and perhaps a partial last block.

#################

Joerg says:

I would use "dd" to read one block, then measure its size:

  dd if=/dev/..... count=1 bs=100000 | wc -c

This should give you the number of bytes read (plus "dd"s
block count lines).

Again, thanks to everyone.

Cheers,

Sheldon Lee Wen

 
Received on Mon Aug 19 2002 - 12:59:36 NZST

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