Skip to content

Instantly share code, notes, and snippets.

@whereisaaron
Created October 31, 2022 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whereisaaron/6546c6bee662a7daf562d36c3352f5e1 to your computer and use it in GitHub Desktop.
Save whereisaaron/6546c6bee662a7daf562d36c3352f5e1 to your computer and use it in GitHub Desktop.
Create a collection of dummy files to use up space
#!/bin/bash -e
START=${1:-1}
END=${2:-10}
for i in $(seq ${START} ${END}); do
filename=$(printf 'dummy-10GiB-%03d.bin' $i)
if [[ -f ${filename} ]]; then
echo "Dummy file ${filename} already exists"
else
echo "Creating dummy file ${filename}"
dd if=/dev/urandom of=${filename} bs=1M count=10240
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment