> So is this any different on Linux? Why is OSX in the title?
mkfile is not available on Linux. The equivalent utility is xfs_mkfile or fallocate.
mkfile is not available on Linux. The equivalent utility is xfs_mkfile or fallocate.
xfs_mkfile could do what mkfile does, the description isn't conclusive enough.
dd if=/dev/zero of=test bs=1k seek=2m count=1
Or python: python -c 'f=open("test", "w"); f.seek(2e9); f.write("\x00")'
Both these calls create a ~2GB file with holes in it. They return almost instantly on OSX.EDIT: oh wait, this isn't what you want. you want a file _without_ holes, my mistake.
dd if=/dev/zero of=test bs=1k count=2mmacOS supports sparse bundle with HFS+