1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/linux/fallocate.md

18 lines
501 B
Markdown
Raw Normal View History

# fallocate
2018-05-06 15:08:41 +02:00
> Reserve or deallocate disk space to files.
> The utility allocates space without zeroing.
> More information: <https://manned.org/fallocate>.
2018-05-06 15:08:41 +02:00
- Reserve a file taking up 700 MiB of disk space:
2018-05-06 15:08:41 +02:00
`fallocate --length {{700M}} {{path/to/file}}`
- Shrink an already allocated file by 200 MiB:
2018-05-06 15:08:41 +02:00
`fallocate --collapse-range --length {{200M}} {{path/to/file}}`
- Shrink 20 MB of space after 100 MiB in a file:
2018-05-06 15:08:41 +02:00
`fallocate --collapse-range --offset {{100M}} --length {{20M}} {{path/to/file}}`