I think you get that error because the directory listed has been removed, but the "find" command still wants to look down there for sub-directories. If you just want to hide the error, re-direct it to /dev/null:
[tt]-depth Process each directory’s contents before the directory itself.[/tt]
Make find start at the leaves of the tree first, and work it's way back to the root.
A problem you might find is that if you have
[tt]dir1
dir1/dir2[/tt]
Removing dir2 will change the date of dir1, which might have been old enough to delete.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.