A 'Smart folder' is in principle a XML formatted file that, when opened, returns a Spotlight search result. To create a Smart folder you can add multiple search terms by pressing the +
(or alt+
). For example, you can choose to only return files that where created in the last 7 days. Although there is a profusion of search terms, some are still missing (like searching within the last 5 minutes).
The commandline version of Spotlight is mdfind
(manual). Although harder to use, mdfind
commands are more flexable than the Smart folder/Spotlight alternative. You can, for example, search for files that were created in the last 5 minutes like this:
mdfind 'kMDItemFSCreationDate > "$time.now(-300)"'
Or were changed in the last 10 minutes:
mdfind 'kMDItemFSContentChangeDate > "$time.now(-600)"'
Fortunatly Smart folders support the mdfind
command! To use mdfind
search commands do the following:
- Go to Finder and press CommandF to start a new Smart folder.
In the search-items bar you can select 'Other...' from the drop down menu. Search for 'Raw query' and add it to your search terms
Now enter your mdfind
search query in the empty text field
kMDItemFSCreationDate > $time.now(-600)
Save your search and you are done.
