I got a tip from my friend Alex Peretti regarding the built in search in OSX. Skip to the end if you are familiar with the default search pains.

I couldn’t understand why, when you start typing in the search box inside any folder’s Finder window, it defaults to searching inside files of the entire computer for matching text, instead of looking at filenames inside the current folder. That means every time I search for something I have to change the settings (they aren’t stored) because 99% of my searches seem to bring up some wordy Nietzsche e-book instead of what I’m looking for.

The screenshot below shows the default search options for context.

Finder Search

My guess is they do it like this so that search works almost every time for the average Joe who doesn’t tend to have thousands of source files and libraries (particularly given Spotlight is insanely fast anyway). Either way, for the power-user help is at hand. This search syntax works inside Spotlight or a Finder search:

  • name:hello – find files who’s filename contains “hello”
  • kind:action – find ActionScript files
  • date:today – find files modified today (or Apps used today)
  • date:>1/1/08 – find files modified after 1/1/08

No need for wildcards, although I imagine they work too. You’ll find Spotlight searches are now lightening fast and hopefully more relevant. Cheers Alex.

Update: There are more commands available, this page has a good summary.