tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Sheldon Lee Wen <sheldon.leewen@cgi.com>
Subject: SUMMARY: Tape block sizes
Date: Mon, 19 Aug 2002 08:59:44 -0400	[thread overview]
Message-ID: <000201c24780$4a171d50$550fa50a@CGIBLAIR.CA> (raw)

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

 





                 reply	other threads:[~2002-08-19 12:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox