I'm trying to scan a backup drive and remove files older than about two years. However, there is one folder I want to be skipped, as it is where the needed older files go.
Here's the command I tried to use: find /mnt/backup/ -path '/mnt/backup/home/shares/Projects/Projects Archive' -prune -o -atime +731 -type f -delete*
I get the result below:
find: The -delete action automatically turns on -depth, but -prune does nothing when -depth is in effect. If you want to carry on anyway, just explicitly use the -depth option.
It seems find may be a dead end for this task, but am hoping someone might have some insight into how to work around this.
Thanks in advance. B