【CentOS】定时crontab
crontab -e 编辑
crontab -l 查看
删除前一天的nacos日志
0 1 * * * /usr/local/nacos/bin/cls.sh
d=`date -d '-1 day' +%F` name="*${d}*" log1="/root/deya/data/nacos2.0.3/bin/logs/${name}" log2="/root/deya/data/nacos2.0.3/logs/${name}" rm -rf ${log1} rm -rf ${log2}
标签:logs,CentOS,nacos,crontab,定时,name From: https://www.cnblogs.com/yangchongxing/p/16744985.html