Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fallocate: add page #2089

Merged
merged 3 commits into from
May 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions pages/linux/fallocate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# fallocate

> Reserve or deallocate disk space to files.
> The utility allocates space without zeroing.

- Reserve a file taking up 700MB of disk space:

`fallocate --length {{700M}} {{path/to/file}}`

- Shrink an already allocated file by 200MB:

`fallocate --collapse-range --length {{200M}} {{path/to/file}}`

- Shrink 20MB of space after 100MB in a file:

`fallocate --collapse-range --offset {{100M}} --length {{20M}} {{path/to/file}}`