mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-16 05:49:01 +00:00
Update cheatsheets
This commit is contained in:
22
linux/fallocate
Normal file
22
linux/fallocate
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# fallocate
|
||||
|
||||
> Reserve or deallocate disk space to files.
|
||||
> The utility allocates space without zeroing.
|
||||
> More information: <https://manned.org/fallocate>.
|
||||
|
||||
- Reserve a file taking up 700 MiB of disk space:
|
||||
|
||||
`fallocate --length {{700M}} {{path/to/file}}`
|
||||
|
||||
- Shrink an already allocated file by 200 MiB:
|
||||
|
||||
`fallocate --collapse-range --length {{200M}} {{path/to/file}}`
|
||||
|
||||
- Shrink 20 MB of space after 100 MiB in a file:
|
||||
|
||||
`fallocate --collapse-range --offset {{100M}} --length {{20M}} {{path/to/file}}`
|
||||
Reference in New Issue
Block a user