The Power of mdfind
Subject:   some more examples
Date:   2006-01-04 19:01:58
From:   hayne
Here's a couple of Bash functions that illustrate a few more features of 'mdfind':

# locatemd: to search for a file using Spotlight's metadata
function locatemd { mdfind "kMDItemDisplayName == '$@'wc"; }

# locaterecent: to search for files created since yesterday using Spotlight
# This is an illustration of using $time in a query
# See:
function locaterecent { mdfind 'kMDItemFSCreationDate >= $time.yesterday'; }