Skip to content

Instantly share code, notes, and snippets.

@StefanLiebenberg
Created December 30, 2016 10:23
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 StefanLiebenberg/ad010f80245208ef46d35bb6e39fd3d1 to your computer and use it in GitHub Desktop.
Save StefanLiebenberg/ad010f80245208ef46d35bb6e39fd3d1 to your computer and use it in GitHub Desktop.
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