...
Code Block |
---|
0 1 * * * find /opt/datafari/logs/ -type f -mtime +7 | xargs --no-run-if-empty rm
0 1 * * * find /opt/datafari/logs/ -type f -mtime +7 | xargs --no-run-if-empty rm
0 1 * * * find /opt/datafari/tika-server/logs/ -type f -mtime +7 | xargs --no-run-if-empty rm
0 1 * * * find /opt/datafari/elk/logs/ -type f -mtime +7 | xargs --no-run-if-empty rm |
This will remove the logs older than the last 7 days. You can adjust the value to fit your needs.