by xxa1e · 5y ago · 0 comments
dd if=/dev/null of=huge.img bs=1024 count=1 seek=5242880000
5TB file and instant creation. Doesn't actually take any space. truncate -s 100T hugefile.img
Another way to do this. fallocate --length 1TB.img
"truncate" is in GNU coreutils, "fallocate" is in util-linux.If you have 100G free, truncate -S 1T will succeed, fallocate -l 1T will not.