fallocate

Preallocate a large file with fallocate

Preallocate a large file with fallocate

A way to fill up lots of disk space

Usage:

fallocate -l <size> </path/to/file>

For example, to allocate 50G of space to ~/largefile:

fallocate -l 50G ~/largefile

Reference

https://unix.stackexchange.com/questions/292843/way-to-instantly-fill-up-use-up-lots-of-disk-space

https://man.archlinux.org/man/fallocate.1.en

Code licensed under the MIT License; all other content under CC BY-SA 4.0.
Last updated on Sep 11, 2026 08:55 UTC
Built with Hugo
Theme Stack designed by Jimmy