meaning of "count=" for dd?
Gary S. Trujillo
gst at wjh12.harvard.edu
Wed Oct 25 03:47:04 AEST 1989
In article <419 at wjh12.harvard.edu> gst at wjh12.UUCP (Gary S. Trujillo) writes:
>My empirical tests of dd leave me puzzled as to the real meaning of the
>"count=" argument. The manual page says "copy only n input records."
>Trouble is, it doesn't say what sort of "record" it's talking about.
>I would have thought that it would be the number of characters in a
>block, as defined by one of the blocksize (e.g., "bs") arguments.
Thanks to everyone who sent email replies - including the AT&T person who
has actually worked on the dd code(!). The upshot of the comments was that
my problem may come from the fact (it is a fact) that I'm reading from a
pipe in my application, and that a "record" (called "block" in other
versions of the man page, apparently) corresponds to one physical read.
Thus, the amount read may vary, depending on a number of factors.
There was a suggestion that I try 512-byte blocks, since that's normally
the size of a program buffer ("but it's not foolproof"). My tests indicate
that suggestion seems to work.
The AT&T guy also says that results vary between System V and BSD UNIX
implementations, having to do with different implementations of the file
system, I think: "Network files will usually break into 2K blocks, no
matter what you ask for."
Thanks again, and happy "dd-ing!" :-)
--
Gary Trujillo
(gst at wjh12.harvard.edu)
More information about the Comp.unix.questions
mailing list