dd if=/dev/zero of=file.img count=1024 bs=1M
This will generate a 1 GB file. Exchange the count number to the amount of megabytes you want to generate.
For example, to generate a 512MB file, you would enter count=512
dd if=/dev/zero of=file.img count=1024 bs=1M
This will generate a 1 GB file. Exchange the count number to the amount of megabytes you want to generate.
For example, to generate a 512MB file, you would enter count=512