dd curiosity solution

Mark W. Snitily mark at zok.UUCP
Tue Jan 2 21:18:33 AEST 1990

In article <592 at junkyard.UUCP> joe at junkyard.UUCP (Joseph Sarkes) writes:
>In article <396 at zok.UUCP>, mark at zok.UUCP (Mark W. Snitily) writes:
>> partition.  Noticed a large speed difference based upon the direction
>> of the I/O.
>> For example, if I write 4 sectors into the partition starting at sector
>> 20000, the write will complete very fast, (i.e. a few seconds):
>>       dd if=myfile of=/dev/rdsk/0p1 seek=20000 count=4
>> But, if I read 4 sectors from the partition starting at sector 20000,
>> the read will take forever to complete, (i.e. we're talking minutes to
>> hours depending upon the skip value):
>>       dd if=/dev/rdsk/0p1 of=myfile skip=20000 count=4
>dd skip= READS over the amount specified. See if your dd command has an
>option iseek= instead of using skip=.
>This should seek over the space instead of reading all of it.
>You can either use strings /bin/dd | grep iseek,
>or just try using the option and look for an error message.
>I understand that some raw devices also have problems seeking, so
>you may have better luck using iseek with a block device.
>Joseph Sarkes	(junkyard!joe)

Thank you Joseph Sarkes.  And thank you to everyone who emailed me or
posted followups to my original query.

For all of you out there running ISC's 386/ix 2.0.2 the correct
solution is (...drum roll...)

      the *undocumented* option "iseek=value".

The eariler example was "dd if=/dev/rdsk/0p1 of=myfile skip=20000  count=4".
When specified as       "dd if=/dev/rdsk/0p1 of=myfile iseek=20000 count=4"
the read from the partition completes immediately (instead of taking
many minutes of wall time).

By looking at the ascii strings in /bin/dd as Joseph suggested, came across
these interesting *undocumented* options:

   iseek=          seek on input file
   oseek=          seek on output file (same as the normal seek=)
   files=          ???
   conv=block      ???
   conv=unblock    ???

Once again curiosity strikes.  Anyone know what the files=, conv=block,
or conv=unblock options are?

I sure am looking forward to having accurate online manuals.  To anyone in
the know, will the man pages in 386/ix 2.2 document these useful dd options?

Once again, thanks to everyone.

Happy new year!

-- Mark

Mark W. Snitily                 Consulting Services:
894 Brookgrove Lane             Graphics, Operating Systems, Compilers
Cupertino, CA 95014             (408) 252-0456
mark at zok.uucp

More information about the Comp.unix.i386 mailing list