Is there a fallocate()
equivalent in OS X?
I would like to aggregate all of those equivalent in OS X questions into some doc/table or whatever for everyone. Anybody knows something familiar?
DESCRIPTION top. fallocate is used to manipulate the allocated disk space for a file, either to deallocate or preallocate it. For filesystems which support the fallocate system call, preallocation is done quickly by allocating blocks and marking them as uninitialized, requiring no IO to the data blocks.
Calls fallocate() on the file object or file descriptor. This allows the caller to directly manipulate the allocated disk space for the file referred to by fd for the byte range starting at offset and continuing for len bytes.
What about using:
mkfile -n 1m test.tmp
It's not the same command but serves the same purpose.
Note that fallocate
uses decimal multipliers, whereas mkfile
uses binary multipliers.
mkfile man
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With