Linux下删除当前目录及子目录下的所有.txt文件

find 目录 -name '*.txt' -type f -print -exec rm -rf {} \;
示例
find /home/tech/data_log -name '*.txt' -type f -print -exec rm -rf {} \;

 

posted @ 2022-04-28 20:55  学而不思则罔!  阅读(500)  评论(0)    收藏  举报