|
That's the *file system* works. When a program reads the directory's inode to determine the directory contents, the file system updates the atime (access time) property on the inode. It doesn't matter if the program doing the access is 'ls' or 'find' or whatever.
You could make your script remove only *files* which are over the age limit as a first pass, then go back and prune directories which are empty.
|