fallocate
Reserve or deallocate disk space to files. The utility allocates space without zeroing. More information: <https://manned.org/fallocate>.
Install
- All systems
-
curl cmd.cat/fallocate.sh
- Debian
-
apt-get install util-linux
- Ubuntu
-
apt-get install util-linux
- Alpine
-
apk add util-linux
- Arch Linux
-
pacman -S util-linux
- Kali Linux
-
apt-get install util-linux
- CentOS
-
yum install util-linux
- Fedora
-
dnf install util-linux
- Windows (WSL2)
-
sudo apt-get update
sudo apt-get install util-linux
- OS X
-
brew install util-linux
- Raspbian
-
apt-get install util-linux
- Dockerfile
- dockerfile.run/fallocate
- Docker
-
docker run cmd.cat/fallocate fallocate
powered by Commando
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
© tl;dr; authors and contributors