15
myss
5y

Life's sometimes just amazing.. like those moments when you do "rm -rf /var" instead of "rm -rf var" and your whole system gets full of errors / unexpected behavior and random crashes.. Since I have project deadline tomorrow, really dunno should I cry or laugh right now

Comments
  • 1
    rm -rfi /var
  • 4
    Stop.
    Using.
    --force
    ffs.
  • 2
  • 2
    --force is sometimes necessary I think.

    I prefer never using a . or / as start. Or using safe-rm.
  • 2
    Gee man, I can almost taste your tears through that rant. Good luck mate!
  • 2
    And why do you use root user? Just use normal user with sudo
  • 0
    @AI-Overlord well ofcourse I did lol.. and actual target directory I meant to delete was also owned by root so there was no other way
  • 1
    @Root how do you recommend deleting a folder with content then?
  • 2
    That's what you get for using root all the time
  • 4
    @toriyaki
    For people that can't help but rimraf everything out of habit, I recommend writing a script that replaces `rm` and have it print what you're actually going to delete, wait a random amount of seconds, then ask you if you're sure.

    For those super-habity people that just wait and type 'y' without thinking or noticing, add a random simple math problem, too.
  • 3
    @Root I like that idea a lot. I shudder to think of removing /var on a production web server with no backups.

    Hmm, time to look into backups.
Add Comment