Using find -mmin to find files with modification time in the future

Solution 1:

To find files modified at least 5 days in the future, use:

find . -newermt "5 days"

The syntax for the time specification corresponds to the one for date -d. See man find for info on the switch named -newerXY for more information.

It is not possible to use e.g. -mmin to do this. It was reported as a bug against GNU find, and was solved by implementing -newerXY in findutils 4.3.3 (~2007) as I showed above.


Apparently it was not GNU find that was used, but BusyBox.

You should then be able to create a temporary file with touch -d and a date in the future and then use the -newer switch for find such as:

touch -d "+5 days" tmpfile
find . -newer tmpfile

BusyBox touch does not support that date format, but the principle is the same and its find supports -newer. Creating the reference file with a correct date is left as an exercise for the reader (always convenient to write).