home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / sgi / 13134 < prev    next >
Encoding:
Text File  |  1992-09-01  |  2.9 KB  |  72 lines

  1. Newsgroups: comp.sys.sgi
  2. Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!nsisrv!climate!merritt
  3. From: merritt@climate.NoSubdomain.NoDomain (John H. Merritt)
  4. Subject: Re: 8mm and dd
  5. Message-ID: <1992Sep1.135248.25555@nsisrv.gsfc.nasa.gov>
  6. Sender: usenet@nsisrv.gsfc.nasa.gov (Usenet)
  7. Nntp-Posting-Host: climate.gsfc.nasa.gov
  8. Organization: Climate and Radiation Branch
  9. References: <715275893@anthrax.cs.duke.edu> <1992Aug31.192332.26751@nsisrv.gsfc.nasa.gov> <p9qi2f0@sgi.sgi.com>
  10. Date: Tue, 1 Sep 1992 13:52:48 GMT
  11. Lines: 59
  12.  
  13. In article <p9qi2f0@sgi.sgi.com>, jeremy@classic.asd.sgi.com (Jeremy Higdon) writes:
  14. |> In article <1992Aug31.192332.26751@nsisrv.gsfc.nasa.gov>, merritt@climate.NoSubdomain.NoDomain (John H. Merritt) writes:
  15. |> > 
  16. |> > I have noticed that if the input file has an odd number of bytes and
  17. |> > you output to the variable block device,  that the entire file will
  18. |> > not be written; the last byte will be missing.
  19. |> 
  20. |> By the way, this should not be happening.  Do you have a simple test
  21. |> case that can make it happen?
  22.  
  23. The example is trivial.  Pick a file with an odd number of bytes, gee,
  24. coincidently my /etc/motd has 21 bytes and give it a spin-da-da.
  25.  
  26. climate> dd if=/etc/motd of=/dev/nrv8mm
  27. climate> mt -t /dev/nrv8mm rew
  28. climate> dd if=/dev/nrv8mm of=newmotd
  29. climate> diff /etc/motd newmotd
  30. 2d1
  31. < Welcome to climate.
  32. climate>
  33.  
  34. Here are the results.  You will notice that the last \n did not
  35. get copied to the tape, verified only by the subsequent read, and 
  36. that some sporious character, 'a' in this case, was transferred
  37. to 'newmotd'.  Do note that the 8mm tape that I am using has had data
  38. written to it previously.  Actually, I don't think this matters if the
  39. tape is a reused one, but that whatever was in the dd buffers on the
  40. read or write ('a') was transferred.  Without seeing the 'dd' source,
  41. I would gander a guess that the datatype for the buffers is 'short'.
  42. Hmmm, specifying 'bs=1' works.
  43.  
  44. I'm really don't care to persue this example with a fresh tape; I know
  45. what to avoid doing.
  46.  
  47. climate> od -xc /etc/motd
  48. 0000000    0a57    656c    636f    6d65    2074    6f20    636c    696d
  49.          \n   W   e   l   c   o   m   e       t   o       c   l   i   m
  50. 0000020    6174    652e    0a00
  51.           a   t   e   .  \n
  52. 0000025
  53. climate> od -xc newmotd
  54. 0000000    0a57    656c    636f    6d65    2074    6f20    636c    696d
  55.          \n   W   e   l   c   o   m   e       t   o       c   l   i   m
  56. 0000020    6174    652e    6100
  57.           a   t   e   .   a
  58. 0000025
  59.  
  60.  
  61.  
  62.  
  63. -- 
  64.         \___   \______   \__  \__  \___   \__
  65.         \___  \________  \__  \__  \____  \__
  66.         \___  \__   \__  \__  \__  \_____ \__
  67.         \___  \__   \__  \_______  \__ \__\__   merritt@climate.gsfc.nasa.gov
  68. \___    \___  \__   \__  \_______  \__  \____   
  69. \___    \___  \__   \__  \__  \__  \__   \___   "Yesterday I knew nothing,
  70.  \_________   \_______   \__  \__  \__    \__    Today I know that."
  71.   \______      \_____    \__  \__  \__     \_
  72.