Reserving Space on Disk

Fred Fish fnf at riscokid.UUCP
Tue Jul 17 08:02:46 AEST 1990


In article <MOSS.90Jul15190502 at ibis.cs.umass.edu> moss at cs.umass.edu writes:
>char buf[ONE_K];
>int i;
>
>for (i = 0; i < FOUR_K; ++i)
>  write (fd, buf, ONE_K);
>
>You might want to tune the size of buf up larger than what I have, but still
>somewhat "reasonable". Something between the size of a track and a cylinder on
>the disk might work reasonably well, say 64K or 128K. Enjoy!		Eliot

This reminds me, I've always wondered why there wasn't a /dev/full as a
standard part of unix.  It's the obvious counterpart of /dev/null, and
simply returns as many null bytes as you ask for.  Then all you would
have to do is:

	dd if=/dev/full of=myfile bs=1k count=4k

-Fred



More information about the Comp.unix.wizards mailing list