删除目录和子目录下所有rpm文件,但是保留文件夹,先cd到想要删除的目录 命令如下 find ./ -name "*.rpm" | xargs rm 转载于:https://www.cnblogs.com/z-x-y/p/9467246.html