dd curiosity

T. William Wells bill at twwells.com
Mon Jan 1 19:09:59 AEST 1990

In article <397 at zok.UUCP> mark at zok.UUCP (Mark W. Snitily) writes:
: Thanks for the suggestion, but quoting from the manual:
:     skip=n   skips n input blocks before starting copy
:     seek=n   seek n blocks from beginning of output file before copying
: "skip" applies to the input file.  "seek" applies to the output file.
: What I'd like to have is a "seek" performed on the input file.
: Ideas anyone?

Right you are. I got it in my head that both applied to the input
file and just never checked. Now, back to the original problem....

Assuming that seekprog is something like this highly condensed

main(argc, argv)
char    **argv;
	extern long atol(), lseek();

	return lseek(0, atol(argv[1]) * atol(argv[2]), 0) == -1;


( seekprog 20000 512 ; dd of=myfile ) </dev/rdsk/0p1

There might be an easier way than writing a program, but I can't
think of one right off the top of my head.

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

More information about the Comp.unix.i386 mailing list