Question

I wanna delete content of log file (/var/log/httpd/access_log) every 10 minutes, Please show me how to do that with crontab in linux Help me please Thanks a lot

Was it helpful?

Solution

Open root's crontab for editing in default editor:

sudo crontab -e

Then add this line:

*/10   *    *    *    *    echo '' > /var/log/httpd/access_log
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top