Monday morning mistake: sudo rm -rf –no-preserve-root /
serverfault.com
serverfault.com
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.