linux中剔除find找到的文件

linux中删除find找到的文件
方法一:
    find . -name filename -exec rm -rf {} \;
方法二:
    find . -name filename |xargs rm -rf;