fallocate
Tell the filesystem to allocate space for a range in a file. toybox
On Linux
Linux
fallocate [-o OFFSET] -l SIZE FILE
-lNumber of bytes in range-o OFFSETStart offset of range (default 0)Linux
Reserve or deallocate disk space to files. The utility allocates space without zeroing.
Reserve a file taking up 700 MiB of disk space
fallocate --length 700M path/to/fileIdentifyShrink an already allocated file by 200 MB
fallocate --collapse-range --length 200MB path/to/fileIdentifyShrink 20 MB of space after 100 MiB in a file
fallocate --collapse-range --offset 100M --length 20M path/to/fileIdentify