[svlug] creating a big binary file
Holt Sorenson
hso at nosneros.net
Thu Oct 11 22:08:32 PDT 2007
On Thu, Oct 11, 2007 at 10:00:47PM -0700, Anthony Ettinger wrote:
>I want to take a 750mb avi file and add to it so it is exactly
>1gb...how can I do this? (i'm not concerned about the quality of the
>file, only that is binary data for testing bandwidth).
If you don't care that it's a bunch of zeros:
dd bs=1048576 count=250 seek=750 if=/dev/zero of=foo.avi
If you do care that it's a bunch of zeros:
dd bs=1048576 count=250 seek=750 if=/dev/urandom of=foo.avi
This will probably trash the end of your avi file (becaus your avi
file probably isn't exactly 750MB). If you're avi file is really
close to but less than 750mb, then the seek will probably
fail.
--
Holt Sorenson
hso at nosneros.net
www.nosneros.net/hso
More information about the svlug
mailing list