Hacker News new | ask | show | jobs
by falcolas 4172 days ago

   rm --preserve-root
isn't a bad thing to have either. That way, even if you do screw up, you won't be able to run rm against '/', even with '-f'.

It's one of the top aliases in my .bash_aliases file.

2 comments

Agreed. Thankfully this is the default on many systems (I'm guessing recent coreutils).

Unfortunately dumb lines like "rm -rf $HOME/$STEAMDIR" still get through unscathed.

I think that

    rm --preserve-root -rf /*
doesn't save you.
You are quite correct.