20
Gophyr
7y

When you accidentally run " rm -rf * " in the directory containing ALL you projects, not in the directory of a single project.

That's right. You just encountered THE DEATH STAR.

Comments
  • 0
    Sounds painfull. I hope you had a backup... and a remote git repo.
  • 1
    @magicMirror I actually did this several years ago... let's just say I hadn't thought about back-ups and I did not yet use version control. I was much younger then... :D
  • 1
    But how can you do that accidentally, hahah
  • 1
    There should be some kind of a temporary backup system hardcoded into linux because this kind stuff happens to everyone.
  • 1
    There is a safety measure.. which you bypassed with the -f switch :P
  • 2
    Alias rm to mv and write a script to empty the folder periodically.

    Also learned this the hard way. Best(Worst). Lesson. Ever.
  • 1
    Have you considered a trash package on Linux and alias the command as rm?

    https://github.com/andreafrancia/...
  • 1
    @Pelle I did it because I was young and I was typing too fast... This is one of the mistakes you make exactly ONCE in your life.
  • 0
    @mortanius Haven't seen this before, will have to look into it. Thanks!
Add Comment