Skip to content

Instantly share code, notes, and snippets.

@ilivessevili
Created January 26, 2016 06:19
Show Gist options
  • Save ilivessevili/16d3c4d76b5710949825 to your computer and use it in GitHub Desktop.
Save ilivessevili/16d3c4d76b5710949825 to your computer and use it in GitHub Desktop.
##using fallocate
fallocate -l 100G large_file.img
##using xfs
xfs_mkfile 10240m 10Gigfile
## using dd
#kilobytes
dd if=/dev/zero of=filename bs=1 count=0 seek=200K
#megabytes
dd if=/dev/zero of=filename bs=1 count=0 seek=200M
#gigabytes
dd if=/dev/zero of=filename bs=1 count=0 seek=200G
#terabytes
dd if=/dev/zero of=filename bs=1 count=0 seek=200T
#BLOCKS and BYTES may be followed by the following multiplicative suffixes: c=1, w=2, b=512, kB=1000, K=1024, MB=1000*1000, M=1024*1024, GB =1000*1000*1000, G=1024*1024*1024, and so on for T, P, E, Z, Y.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment