find . -name .git -type d -exec rm -fr {} \; (注意:最后的分号就必须添加的) find . -name .git -exec rm -rf {} \; find -name '.git*' |xargs rm -rf