[lug] file creation of a specific size
D. Stimits
stimits at idcomm.com
Wed May 30 15:24:44 MDT 2001
Stephen Smith wrote:
>
> How would I create files (of whichever type) in
> specific sizes?
>
> For instance, I would like to create a 10mb file
> of nothing.
>
> Can I do this?
>
> SGS
>
I haven't looked at the man page lately, but you should be able to use
dd. Copy from /dev/zero, /dev/random, or /dev/urandom. urandom will be
slow, where random or zero should be reasonably fast.
If your file can't be made the exact size you want, make it one less
block, then append to it with something like:
echo "0" >> myfile
D. Stimits, stimits at idcomm.com
More information about the LUG
mailing list