dd curiosity

T. William Wells bill at twwells.com
Sun Dec 31 10:39:51 AEST 1989


In article <396 at zok.UUCP> mark at zok.UUCP (Mark W. Snitily) writes:
: 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

Does an lseek to the appropriate place.

: 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

Reads everything from the beginning of /dev/rdsk/0p1 till it gets
to the place to read.

: Any ideas of how to speed it up?

Use seek instead of skip.

---
Bill                    { uunet | novavax | ankh | sunvice } !twwells!bill
bill at twwells.com



More information about the Comp.unix.i386 mailing list