I have an HFS+ volume where I need to be able to reserve large amounts of space on it quickly, upwards of 100 GB. The recommended command to use, mkfile -n
, does create large files but the -n
flag seems to be ignored for HFS+ (though not APFS), as it still takes a long time (i.e. several minutes) to finish and the resultant file is still zeroed out. I also tried installing truncate
via MacPorts and using that, but it suffers from the same issue.
Is there any other way to do this that just instantly creates a large a file with an arbitrary size? Or am I perhaps running up against a limit of HFS+?
dd if=/dev/zero of=zero bs=$((1024*1024)) count=$((100*1024))
might work, but if you need to have the file written to a HDD, any method will be as slow/fast as the drive itself.