Hacker News new | past | comments | ask | show | jobs | submit login
Monday morning mistake: sudo rm -rf –no-preserve-root / (serverfault.com)
1 point by samcolvin on Oct 15, 2020 | hide | past | favorite | 1 comment



As one comment says "How do you even type --no-preserve-root accidentally?! :-o"

We've all made this mistake, or we will all make this mistake in future if we haven't already.

In my case, I was trying to remove a few dot-directories in /tmp when I was a mere UNIX neophyte. I was also ignorant of the dangers of always working as root. So I thought very little of cd'ing to /tmp and entering

       rm -rf .*
I learned two very valuable lessons that day: Always work as an ordinary user; There are other directories that start with a '.'.

Oh, How did I fix that? I had to do a complete reinstallation. That was my third lesson. Sometimes you have to be penalised quite a bit of time for acting stupidly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: