On Mon, 6 Aug 2007, Allen S. Rout wrote:
> So, for debugging purposes (long story) I want to create a couple of
> files which are precisely
>
> 1042808832
>
> bytes long. We were musing about optimal ways to do this. I finally
> punted and wrote code:
Do you care about the contents of the files? You apparently don't want
all zeros, but you don't mention what you do want.
Since you mention /dev/random, I assume you don't really care about the
content as long as it varies. You could cat together multiple large files
or copies of the same large files...say enough copies of uncompressed
kernel source to make your target size...or even just use dd to take the
first 1042808832 bytes of a disk partition.
----------------------------------------------------------------------
Jon Lewis | I route
Senior Network Engineer | therefore you are
Atlantic Net |
_________ http://www.lewis.org/~jlewis/pgp for PGP public key_________
|