Unix Linux Create a Large File on Linux Tips of Linux Linux 1 2 3 4 5 $ fallocate -l 10G gentoo_root.img $ dd if=/dev/zero of=./gentoo_root.img bs=4k iflag=fullblock,count_bytes count=10G $ truncate -s 10G gentoo_root.img OS X, Solaris, SunOS and probably other UNIXes 1 # mkfile 10240m 10Gigfile HP-UX 1 # prealloc 10Gigfile 10737418240