$ df -h
...
/dev/nvme0n1p1 500G 404G 76G 85% /
...
cd /var/log/crashfix
sudo du -hc --max-depth=0 .
sudo rm monitor.log
sudo du -hc --max-depth=0 .
cd /var/www/html/protected/data/crashReports/
sudo du -hc --max-depth=0 .
sudo find . -type f -ctime +120 -delete
sudo du -hc --max-depth=0 .
$ df -h
...
/dev/nvme0n1p1 500G 404G 76G 85% /
...
Create a file in /scripts/lean_crashfix_120_days.sh
with the content below:
find /var/www/html/protected/data/crashReports/ -type f -ctime +120 -delete
Open cron table to edition
$ sudo crontab -e -u root
Add a new line
0 5 * * 1 /scripts/clean_crashfix_120_days.sh