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?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this communityAs 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?
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.
-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.
Jan 16, 2014 at 5:46
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