10

As we all know, despite being named "Finder", the Finder is virtually useless at finding files.

In Mac OS X 10.6 (or any version), how can I use the command line (bash in Terminal) to find files modified today?

16

There are several ways to do this in bash from the terminal - depending on exactly what you want to find:

Find files modified in the last 24 hours

find / -mtime -1 -print

Find files modified today (likely what you want)

find / -newerct 'yesterday' -print

or, using Spotlight

mdfind date:today

This can also be done from the GUI with Spotlight.

  1. Open Spotlight (option-command space by default).
  2. Add a criteria to search for, by hitting the Plus sign near the top right of the Spotlight window.
  3. Change the criteria to "Last modified date" is "today."
  • 5
    Note that you don't need the -print at the end since find defaults to it and in most cases you want to replace the / with either . to find down from the current directory or ~ to find in your home directory rather than the top of the tree. – Tony Williams Jan 16 '14 at 5:46
  • possible to check files modifies in last 5 minutes or last 2 hours? – Ewoks Jul 12 '17 at 8:11
  • @Ewoks Yes, mtime defaults to using days, but if you specify units, can find modifications from last n seconds, minutes, hours, or weeks, e.g.: find . -mtime -5m -or- find . -mtime -2h – Scot Aug 25 '17 at 22:39
  • 1
    Just to help others -Btime is creation time, -atime is access time, -ctime is change of file status (aka "date added"), -mtime is modified time – Matt Sephton Jan 28 '18 at 11:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .