find ~ -regex '.*log$' -exec rm -f {} \;注意最后加一个空格和\;{}代表当前找到的文件名 转载于:https://blog.51cto.com/lonelyprogram/1355266