I have WHD installed on a virtual server. It uses linux and due to lack of space on disc it falls over every few months because of all the log files backups. I was told by support that I can set up a crontab to solve this issue, which I have done today but wanted to check that the commands I have put down are correct.
I edited the crontab with the following:
0 0 * * * /bin/find /usr/local/webhelpdesk/pgsql19/Backups -type f -mtime +7 -exec rm -rf {} \;
using what they had given me as a guide
0 0 * * * /bin/find /path_to_files -type f -mtime +7 -exec rm -rf {} \;
I saved it
Is this correct or was I meant to change any of the other parts?
It should keep the last 7 days worth