in reply to Re: rm old directory
in thread rm old directory

Relying on atime is generally a bad idea. I for one disable atime tracking during mounting, because IMHO it's a bad idea to have a side effect from every read.

On my box your script would thus remove many directories that should stay.

So rather rely on mtime.

Replies are listed 'Best First'.
Re^3: rm old directory
by Argel (Prior) on Jul 23, 2008 at 00:06 UTC
    This is probably an edge case, but we had a tftp directory that we were cleaning up based on last modified time. The problem we ran into is that Windows/Samba and Konqueror all maintained the original timestamps on the file. So when someone copied a file created back in 2006 over to the system it got deleted fairly quickly!

    Our workaround was to make sure the files were not being backed up and then use the last access time instead of the last modified time.