What?
How to create a file of any given size on linux
Why?
Quick testing, ballast, and dummy file creation.
How?
Create a single 100K file1
or
Create a single 100K file filled with zeros
or
or
on Mac, use:
Create a single 100K file filled with random bytes
or
or
on Mac, use:
Footnotes
-
Note that a truncated file may not necessary have the real space allocated to it and therefore will be subject to certain optimizations with respect to syscalls that may not apply to other file types. ↩