Crontab Job
OS: RHEL 6.10
DB: oracle 11.2 G RAC
Question: I need to following command in a crontab job:
find * -mtime +8 -exec rm -rf {} \;
I would like to run it in this directory: /opt/ora/11.2.0/log/diag/tnslsnr/1234/listener_scan/alert
Can I write it like this in crontab -e: 0 05 15 * * /opt/ora/11.2.0/log/diag/tnslsnr/1234/listener_scan/alert find * -mtime +8 -exec rm -rf {} \;
It will run every 15th of a Month at 5 AM, it will remove any files older than 8 days in that directory.
Thanks for your help.