meaning of "count=" for dd?

Gary S. Trujillo gst at wjh12.harvard.edu
Tue Oct 24 07:25:30 AEST 1989


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.

I find, however, that the number of characters copied by identical dd
commands is different depending on the data, leading one to suspect it's
counting newlines, or some such.  However, the numbers don't correlate
with what's reported for "lines" by wc.  (It's binary data - actually
a compressed cpio archive, so wc is the only way I can count what look
like newlines in the file.)

If anyone is interested in the problem, and would like more details,
please send email.  I'm working on improvements to a backup-to-floppy
script for my UNIXpc.  I just recently discovered a bug in the script
I've been using; my modifications are an attempt to deal with the bug
by inserting an intermediate disk-to-disk pass over the data using a
floppy-sized image before actually writing to floppy, to make sure
that everything gets onto each floppy.

I thank you, my backups thank you (in advance, of course)!


-- 
	Gary Trujillo
	(gst at wjh12.harvard.edu)



More information about the Comp.unix.questions mailing list