- 定时清理linux文件日志
1.在home目录创建clear.sh文件
2.添加内容:find /home/log -mmin +60 -type f -exec rm -f {} \;
3.创建定时任务
crontab -e
0,5,10,15,20,25,30 * * * * /home/clear.sh
- 定时清理oracle归档日志文件
1.在home目录创建clear.sh文件
2.添加内容:find /home/log -mmin +60 -type f -exec rm -f {} \;
3.创建定时任务
crontab -e
0,5,10,15,20,25,30 * * * * /home/clear.sh