OS X Tip – Use Spotlight in the CLI
Spotlight can be ran from the command line as well as from the GUI. Simply open a terminal window and type the command, mdfind followed by the search string.
For Example:
% mdfind greg
This would work just like the GUI, exempt it will echo its output to the terminal window. You can also pipe commands such as grep and search out specific information:
% mdfind greg | grep xls
This will display all the matches for greg and filter out only Excel spreadsheets.