I am using this command to list all files that have been modified in the last day (or created)
find ./ -mtime 1 -ls
However it keeps returning files from 30th April when I am running the command just now (2nd May at 19:38)
Can anyone advise why this is occurring and / or give me a better command to use to find files modified or create in the last 24 hours period
find . -mtime -1 -ls
or preferablyfind . -mmin -1440 -ls
– heemayl May 02 '15 at 18:47Post that second one as the answer so I can accept it as it worked for me
– MOLEDesign May 02 '15 at 18:50find
interprets the digits is not intuitive. Fromman find
(slightly modified):When find figures out how many 24-hour periods ago the file was last modified, any fractional part is ignored, so to match -mtime +1, a file has to have been modified *at least* two days ago.
– gogoud May 02 '15 at 18:55