Re: Create files with specific sizes?

SVisor
2004-12-14T09:41:19Z

I have a follow up question.

...
>>is there any way (some command) that will allow me to
>>create blank files with specific sizes, eg 1MB, 5MB, 10MB etc.
...
> dd if=/dev/zero of=file1 bs=1k count=1024

I wanted a file of garbage, not zeroes.
So I tried: dd if=/dev/random of=file bs=1k count=1024

But to my suprise I got only a ~4k file. I know that dev/random may run
out of values. But should dd not wait until there are enought of data?

// Jarmo