logoalt Hacker News

gblargg • today at 2:12 AM • 1 reply • view on HN

Wow, that bash script they wanted him to run would have absolutely thrashed his drive:

    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.

Replies

chaps • today at 2:33 AM

Ended up not running the script and ran a tool specifically meant for that purpose.

➕ show 1 reply