home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.admin
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!agate!doc.ic.ac.uk!cc.ic.ac.uk!imperial.ac.uk!vulture
- From: vulture@imperial.ac.uk (Thomas Sippel - Dau)
- Subject: Re: How to determine the # of files per tape?
- Message-ID: <1992Dec14.193835.14513@cc.ic.ac.uk>
- Sender: vulture@carrion.cc.ic.ac.uk (Thomas Sippel - Dau)
- Nntp-Posting-Host: cscgc
- Reply-To: cmaae47@imperial.ac.uk
- Organization: Imperial College of Science, Technology and Medicine
- References: <1992Dec11.180114.21986@nsisrv.gsfc.nasa.gov>
- Date: Mon, 14 Dec 92 19:38:34 GMT
- Lines: 42
-
- In article <1992Dec11.180114.21986@nsisrv.gsfc.nasa.gov>, markb@news.gsfc.nasa.gov (Mark R. Baith) writes:
- -
- - Does anyone have an idea for determining the number of files on a
- - foreign data tape ?
- -
- - (Note: Foreign in the sense that the tape is not a standard UNIX
- - tar or backup tape...the tape simply contains data files)
-
- You need to define "file" more clearly. If it cam from VMS and was
- written in VMS backup form, you have two definitions of file:
-
- o file on the tape, I.e. a contiguous sequence of fixed length
- block ended by a tape mark or file mark constitutes a "save set"
-
- o file as the user sees it, with each of the seve sets containing
- one of more "files", with format, name, owner and access information
- for the file
-
- Each of these user files could, of course, have been a save set ...
- In any case, if its a VMS backup tape, you are almost stuffed, as the only
- known way to read them reliably is to buy a VMS machine to do it.
-
- You could start by counting file marks by (on ***x) issueing a read() with
- an appropriate buffer size and count the number of zero length blocks,
- or however else your system indicates having found a file mark.
-
- No, I will not define "appropriate" more clearly, try 1 Gigabyte of read()
- buffer, that shouldcover most cases ...
-
- Be sure not to mistake parity errors at the beginning of a block for
- file marks ...
-
- In short, unless you know more about the tape or use your initiative,
- it is pretty hopeless.
-
- Thomas
- --
- *** This is the operative statement, all previous statements are inoperative.
- * email: cmaae47 @ ic.ac.uk (Thomas Sippel - Dau) (uk.ac.ic on Janet)
- * voice: +44 71 589 5111 x4937 or 4934 (day), or +44 71 823 9497 (fax)
- * snail: Imperial College of Science, Technology and Medicine
- * The Center for Computing Services, Kensington SW7 2BX, Great Britain
-