logoalt Hacker News

lelandfe • yesterday at 11:47 PM • 1 reply • view on HN

[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.


Replies

gblargg • today at 2:12 AM

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.
➕ show 1 reply