Quickly generate an empty file of a certain size

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

Leave a Reply

Your email address will not be published. Required fields are marked *

Markdown is allowed in comments.