On a Red Hat Linux system, I have a directory with several hundred files. I wanted to delete all files older than 24 hours. I did the deletion using
find . -type f -mtime +1 -delete. Trivial stuff, right? Then, while checking the results, I discovered that
ls -l reports files older than 24 hours in the directory. Note the date below, and the result of the last find:
> date Sun Jan 5 19:02:43 PST 2014 > find . -type f -mtime +1 | wc -l 0 > find . -type f | xargs /bin/ls -l | grep 'Jan 3' | wc -l 70
Curiously, there are no files older than about 48 hours. (There definitely were before.) At this point, however, I'm well and truly stumped. I'm probably missing something obvious, but what? Can someone please enlighten me?