In mac os, how can I search the files modified or used within a specified timespan on a date?
For example i want to get the files used between 10am to 4pm on 10/30/2018. Can this be done either via finder or terminal?
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 community
A terminal based approach would use mdfind (the CLI Spotlight too).
Using mdls on a file you can see all the attributes available to you, something like kMDItemContentModificationDate looks like what you want.
So, the mdfind command would be something like
mdfind 'kMDItemContentModificationDate < $time.iso(2018-10-30T16:00:00) && kMDItemContentModificationDate > $time.iso(2018-10-30T10:00:00)'
You can chain together any combination of the attributes returned from mdls.