Last Updated: February 25, 2016
·
738
· rlankenau

Create a file of a given size quickly

If you need a file of a given size, but don't care about the contents, you can use hdparm to create it. The size is specified in 1k blocks. The following command creates a 1GB file.

$hdparm --fallocate 1000000 /home/rlankenau/bigfile