home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sgi
- Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!nsisrv!climate!merritt
- From: merritt@climate.NoSubdomain.NoDomain (John H. Merritt)
- Subject: Re: 8mm and dd
- Message-ID: <1992Sep1.135248.25555@nsisrv.gsfc.nasa.gov>
- Sender: usenet@nsisrv.gsfc.nasa.gov (Usenet)
- Nntp-Posting-Host: climate.gsfc.nasa.gov
- Organization: Climate and Radiation Branch
- References: <715275893@anthrax.cs.duke.edu> <1992Aug31.192332.26751@nsisrv.gsfc.nasa.gov> <p9qi2f0@sgi.sgi.com>
- Date: Tue, 1 Sep 1992 13:52:48 GMT
- Lines: 59
-
- In article <p9qi2f0@sgi.sgi.com>, jeremy@classic.asd.sgi.com (Jeremy Higdon) writes:
- |> In article <1992Aug31.192332.26751@nsisrv.gsfc.nasa.gov>, merritt@climate.NoSubdomain.NoDomain (John H. Merritt) writes:
- |> >
- |> > I have noticed that if the input file has an odd number of bytes and
- |> > you output to the variable block device, that the entire file will
- |> > not be written; the last byte will be missing.
- |>
- |> By the way, this should not be happening. Do you have a simple test
- |> case that can make it happen?
-
- The example is trivial. Pick a file with an odd number of bytes, gee,
- coincidently my /etc/motd has 21 bytes and give it a spin-da-da.
-
- climate> dd if=/etc/motd of=/dev/nrv8mm
- climate> mt -t /dev/nrv8mm rew
- climate> dd if=/dev/nrv8mm of=newmotd
- climate> diff /etc/motd newmotd
- 2d1
- < Welcome to climate.
- climate>
-
- Here are the results. You will notice that the last \n did not
- get copied to the tape, verified only by the subsequent read, and
- that some sporious character, 'a' in this case, was transferred
- to 'newmotd'. Do note that the 8mm tape that I am using has had data
- written to it previously. Actually, I don't think this matters if the
- tape is a reused one, but that whatever was in the dd buffers on the
- read or write ('a') was transferred. Without seeing the 'dd' source,
- I would gander a guess that the datatype for the buffers is 'short'.
- Hmmm, specifying 'bs=1' works.
-
- I'm really don't care to persue this example with a fresh tape; I know
- what to avoid doing.
-
- climate> od -xc /etc/motd
- 0000000 0a57 656c 636f 6d65 2074 6f20 636c 696d
- \n W e l c o m e t o c l i m
- 0000020 6174 652e 0a00
- a t e . \n
- 0000025
- climate> od -xc newmotd
- 0000000 0a57 656c 636f 6d65 2074 6f20 636c 696d
- \n W e l c o m e t o c l i m
- 0000020 6174 652e 6100
- a t e . a
- 0000025
-
-
-
-
- --
- \___ \______ \__ \__ \___ \__
- \___ \________ \__ \__ \____ \__
- \___ \__ \__ \__ \__ \_____ \__
- \___ \__ \__ \_______ \__ \__\__ merritt@climate.gsfc.nasa.gov
- \___ \___ \__ \__ \_______ \__ \____
- \___ \___ \__ \__ \__ \__ \__ \___ "Yesterday I knew nothing,
- \_________ \_______ \__ \__ \__ \__ Today I know that."
- \______ \_____ \__ \__ \__ \_
-