I have log files which have the format as catalina.2020-08-06.log
I want to set a cron job
which deletes all the above log files that are older than one week
I am using crontab -e
to write the cron
Then, written the following cron:
0 11 * * * rm -rf /var/logs/catalina.2020-*
How to update above cron so that it deletes only the files which are older than one week?