fallocate#
Pre-allocate space for a file (no zero-fill on supporting FS).
$ fallocate -l 1G disk.img
$ fallocate -l 4G /swapfile && chmod 600 /swapfile
$ fallocate -d sparse.img
Pre-allocate space for a file (no zero-fill on supporting FS).
$ fallocate -l 1G disk.img
$ fallocate -l 4G /swapfile && chmod 600 /swapfile
$ fallocate -d sparse.img