1、查找超过30天未更新的目录并删除
find ./ -maxdepth 1 -ctime +30 -type d -exec rm -rf {} \;
2、除xxx不删,其他都删
ls |grep -v tldw-data-gov-1.2.0-SNAPSHOT.jar.24|xargs rm -f
3、只删xxx
find ./ -name "run.log.*" -exec rm {} \;
标签:删除,exec,30,查找,天未,rm From: https://www.cnblogs.com/daizichuan/p/17488247.html