I run this command on a Unix box
find . name CVS -exec rm -fr {} \;
What i wanted to do is delete any file called CVS within any directory from the current directory and it deleted everything.
Fortunately all i had to do to recover is check out again from CVS. imagine if i specified / as the starting directory!
Edit
I think the reason it did that is because i used "name" instead of "-name". I just rerun it as
find . -name CVS -exec rm -fr {} \;
And it seem to work fine. What exactly happens if name is used as opposed to -name?
find … -exec echo rm -fr {} \;. – Gilles Oct 30 '10 at 13:38