Linux cron job (delete the log)

Linux cron job (delete the log)

Delete the log script

#!/bin/sh
# remove log
find /home/asia/myopr/opr/logs/ -name "*.log*" |xargs rm -rf;

Configuration regular tasks

vi /etc/crontab

*/1 * * * * /home/asia/myopr/opr/rmlog.sh
0 1 * * * (每天1点0分执行)

Short step a thousand miles, no small streams into a mighty torrent accumulation, the program requires perseverance wonderful life!

Published 38 original articles · won praise 32 · views 394

Guess you like

Origin blog.csdn.net/Asia1752/article/details/103949994
Recommended