find . -name "*.bak" -type f -delete 在删除之前可以使用 find . -name "*.bak" -type f 进行确认 参考: http://askubuntu.com/questions/377438/how-can-i-recursively-delete-all-files-of-a-specific-extension-in-the-current-di