Hi all,
I'm looking to set up a cron job to automatically delete files from my NAS folder older than 30 days.
After some Googling I found this old thread from 2013: viewtopic.php?t=63326
Does anyone know if the arguments are still valid in modern Raspberry OS?
I've edited it for my use, shown below.
0 1 * * * /home/pi/OMVNAS/Backups/'Raspberry Pi/Den Top Raspberry Pi4 Backup Images'/* -mtime +30 -exec rm {} \;
As I understand it, the cron job will run every day at 1.00am, and delete any files within the 'Den Top Raspberry Pi4 Backup Images' folder older than 30 days.
Will that work as expected?
Thanks.