From find manual:
mtime n
File's data was last modified n*24 hours ago.
So
find . -mtime 0
should find what was modified n*24 hours ago, which is 0*24 hours ago, which is 0 hours ago. But it doesn't. I think it finds what was modified between 24 hours ago and the present moment.
Then
find . -mtime 0
is equal to
find . -mtime -1
Am I right? Is the manual wrong?
These are my thoughts (edited):
-mtime -1, file was modified less than 24 hours ago
-mtime -0, file was modified less than 24 hours ago
-mtime 1, file was modified **exactly** 24 hours ago
-mtime +1, file was modified more than 24 hours ago
-mtime +0, file was modified more than 24 hours ago.
-mtime 0, file was modified **exactly** 24 hours ago
I think I haven't gotten it right yet, because find . -mtime 0
is bringing up files I didn't modified exactly 24 hours ago
Edit2:
Okay, I really don't understand anything at all, but I guess this is the right cheatsheet:
find . -mtime +0 # find files modified greater than 24 hours ago
find . -mtime 0 # find files modified between now and 1 day ago
# (i.e., in the past 24 hours only)
find . -mtime -1 # find files modified less than 1 day ago (SAME AS -mtime 0)
find . -mtime 1 # find files modified between 24 and 48 hours ago
find . -mtime +1 # find files modified more than 48 hours ago