home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / question / 14898 < prev    next >
Encoding:
Text File  |  1992-12-22  |  2.0 KB  |  41 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!spool.mu.edu!agate!boulder!ucsu!spot.Colorado.EDU!ushomirs
  3. From: ushomirs@spot.Colorado.EDU (USHOMIRSKIY GRIGORIY)
  4. Subject: Comparing tapes using cmp
  5. Message-ID: <ushomirs.725059242@spot.Colorado.EDU>
  6. Sender: news@ucsu.Colorado.EDU (USENET News System)
  7. Nntp-Posting-Host: spot.colorado.edu
  8. Organization: University of Colorado, Boulder
  9. Date: Tue, 22 Dec 1992 21:20:42 GMT
  10. Lines: 29
  11.  
  12. I need to compare a bunch of tapes to see if the files stored on tapes are
  13. identical.  The tapes consist of 6 - 12 files stored in simple blocked format
  14. (i.e. created using dd if=file.on.disk of=tape-device).  I am trying to use
  15. cmp to accomplish this but it is acting quite flakey.  When the block size on
  16. both tapes being compared is the same cmp works perfectly.  But if the block
  17. sizes differ cmp freaks out sometimes.  If I try cmp /dev/tape1 /dev/tape2
  18. then I get an "Invalid argument" error (which I guess means that cmp tried
  19. to read a tape with wrong block size).  If I try being more sly and do
  20. dd if=/dev/tape1 ibs=tape-1-block-size obs=tape-2-block-size | cmp - /dev/tape2
  21. it works most of the time, but sometimes it gives me an error "EOF on /dev/tape2" even if I know that the files are exactly the same.
  22.  
  23. Does anyone have any idea how to compare tapes of different block size 
  24. *reliably*?  All I need to know for comparing purposes is whether the files
  25. are identical or not, I do *not* need to know what lines are different, etc
  26. (the files are binary, so it wouldn't do any good anyway).
  27.  
  28. I am using a SPARCstation 2 with SunOS 4.1.3.  Tapes I'm trying to compare are
  29. an Exabyte 8mm tape and a 6250 (9-track tape).  Copying tapes to disk and 
  30. comparing disk files would not work for me (files are too big and there are too
  31. many of them to bother).
  32.  
  33. I have tried both the cmp that came with SunOS and GNU's cmp (version 2.0).  
  34. Both fail with the same error.
  35.  
  36. Thanks for any replies.  Please e-mail to ushomirs@spot.colorado.edu if 
  37. possible.
  38.  
  39. Greg
  40.  
  41.