Reply to post: accidentally

What do you do when all your source walks out the door?

Joe W Silver badge
Facepalm

accidentally

I wanted to remove hidden files on a linux machine (you all know where this is heading, right?). Unfortunately some idiot (yeah, me) had done some work as root (yeah...), and some of the hidden files were actually owned by root. So some knucklehead (yeah, me again) did some "hard thinking" (not really) and regexp'ing, and the hidden files, beginning with a "." and then letters following, or maybe even numbers (not that said idiot cared), would surely be matched by ".*". Unfortunately the command rm -rf .* also matched .. and everything under that one as well.

Even spinning rust is really quick when it comes to just unlinking the references to the inodes to clear up space.

I did not lose too much stuff, but I learned a valuable lesson that day.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon