From 57849426b38168340c442faadd01aeff4c64c0e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Severin=20F=C3=BCrbringer?= Date: Sun, 6 May 2018 15:08:41 +0200 Subject: [PATCH] fallocate: add page (#2089) --- pages/linux/fallocate.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pages/linux/fallocate.md diff --git a/pages/linux/fallocate.md b/pages/linux/fallocate.md new file mode 100644 index 0000000000..bce5d975b4 --- /dev/null +++ b/pages/linux/fallocate.md @@ -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}}`