[1] was a lot crazier than I was expecting and I read the whole thing. I’m glad you didn’t have to face any serious repercussions.
head -500000 /dev/urandom > fill_unused_space
while [ 1 ] ; do
echo " "
echo "Making a copy of the large file on `date`"
cp fill_unused_space fill_unused_space`date +%s` || break
echo " "
echo "Pass $counter. Display how full the file systems are:"
df
done
How many times can your system overwrite a 500k file in a second? Hopefully it wouldn't get flushed each time, saving your disk.