From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Sheldon Lee Wen Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: Tape block sizes Date: Mon, 19 Aug 2002 08:59:44 -0400 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <000201c24780$4a171d50$550fa50a@CGIBLAIR.CA> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1029761916 27563 127.0.0.1 (19 Aug 2002 12:58:36 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 19 Aug 2002 12:58:36 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.20.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 17gm75-00079u-00 for ; Mon, 19 Aug 2002 14:58:31 +0200 Original-Received: (qmail 21243 invoked by uid 5); 19 Aug 2002 12:59:32 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 21235 invoked from network); 19 Aug 2002 12:59:32 -0000 Original-Received: from unknown (HELO emroute1.cind.ornl.gov) (160.91.4.119) by 0 with SMTP; 19 Aug 2002 12:59:32 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0H1300I86DF5BU@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Mon, 19 Aug 2002 08:59:31 -0400 (EDT) Original-Received: from whms0073.cwshs.com (mx1.god.cgi.ca [64.86.141.6]) by emroute1.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0H13008DLDEZ3S@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Mon, 19 Aug 2002 08:59:25 -0400 (EDT) Original-Received: from whml0344.cgi.ca ([10.254.251.20]) by whms0073.cwshs.com (Netscape Messaging Server 4.15 whms0073 Jan 17 2002 00:23:08) with SMTP id H13DFG01.2RH for ; Mon, 19 Aug 2002 08:59:40 -0400 Original-Received: from whms0335.wshs(10.254.245.207) by whml0344.cgi.ca via csmap id 4614; Mon, 19 Aug 2002 09:00:52 -0400 (EDT) Original-Received: from sleewen ([10.165.15.85]) by whms0335.cwshs.com (Netscape Messaging Server 4.15 whms0335 Jan 17 2002 00:23:08) with ESMTP id H13DCI00.1VG for ; Mon, 19 Aug 2002 08:57:54 -0400 Original-To: tru64-unix-managers@ornl.gov X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Mailer: Microsoft Outlook, Build 10.0.3416 Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal Xref: main.gmane.org gmane.os.tru64.managers:1400 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:1400 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