0

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?

  • I have tried using search options available in the finder with used dates etc. and so far i can only get the files with the date and unable to filter to the time – User 99x Oct 30 '18 at 15:27
1

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.

  • Thanks for the reply. Can you tell me how can i do the same search with usedDates. Because usedDates has more than one value on it – User 99x Oct 31 '18 at 4:57

You must log in to answer this question.

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