Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bash script to dump filesystem with urandom data.
#/bin/bash
i=0;
while [ "$(df -P . | awk 'NR==2 {print $4}')" -gt 0 ]; do
i=$((i+1));
file=temp$i.dump;
echo writing $file;
if [ ! -e $file ]; then
dd if=/dev/urandom of=$file bs=1MB count=1024;
fi;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.