This page deals with the perennial problem of finding things on your computer, and in particular on a Mac running OS X. There is no Google desktop search for the Mac, but if you have OS X 10.4 (Tiger), then there is Spotlight. However, what about people who either don't have Tiger or (a common phenomenon) don't like Spotlight? The answer is: searching has always been one of the strong points of UNIX, so there is a lot of search functionality already there, hidden in the depths of the Darwin system.
It seems the main problem with Spotlight is that making everything searchable doesn't imply that everything will be findable. The list of retrieved files in a Spotlight search is often too exhaustive to be usable in an efficient way. It is important, therefore, to know how to restrict such searches. This is discussed on Apple's Spotlight tips page. I'll collect some of my own bits of information below.
The Finder's own search functionality (accessed with Command-F) is terrible under Tiger: although it gives you noce visual access to Boolean search options, it is extremely slow and resource-intensive even for small folders. I practically never use it. Spotlight is another matter; it gets resuts rather quickly, but you are often drowned in too much information because the user interface doesn't make it easy to customize the search.
The Spotlight tips page mentioned above provides more insight into Spotlight's inner workings. It's all about collecting metadata in a central store. But as will be discussed below, this is nothing completely new to UNIX (see the locate command, but also the various help systems such as apropos). So it's no wonder that Spotlight's functionality turns out to be accessible from the Darwin command line as well. This completely changes my attitude toward Spotlight: it's an advantage that far outweighs its drawbacks, because it shows Apple is really trying to take the needs of the UNIX-level user seriously.
Spotlight allows you to customize your searches to a certain extent from within the Spotlight search box. For example, ending a search phrase with kind: pdf will throw out all non-pdf items. To go further, the Terminal is more useful. The main Spotlight terminal command is mdfind.
The Terminal lets you get the most out of Spotlight because it makes "post-processing" easier.
Although the advanced options of the GUI search box also let me do things like kind: lyx (because I have installed a Spotlight importer for LyX), this doesn't work for arbitrary file types. On the command line, I could get all the LyX files containing the word Bratwurst by typing
mdfind Bratwurst | grep ".lyx"
Similarly, I could find all the non-PDF files containing this search term
mdfind Bratwurst | grep -v ".pdf"
Here is something you can do with Spotlight that you can't do so easily with the old Finder (Sherlock): Let's say you remember you once wrote a C program that had to be linked with the accelerate framework. You don't recall the name of the program, but would like to find it so you can see how you did the linking. But you're at home at your little Panther laptop away from the big number-crunching G5 at work where the programs are. So log into that machine by ssh. If all your programs are in the directory "prgs", you can now type mdfind -onlyin progs accelerate, and your problem is solved in the blink of an eye. I just tried something like this for real. The man page for mdfind gives more information.
In order to achieve the same thing with regular UNIX command tools, one has to think harder and wait longer. Nevertheless, I'll go into some possible non-Spotlight approaches in what follows. In principle, one could use the command-line Spotlight tools to relieve small machines of the Spotlight activity alltogether by backing such machines up onto a large computer where Spotlight then indexes everything. The small computers could pretty much disable Spotlight for those directories that are backed up. Then if a difficult search needs to be performed, it could be done remotely on the backup server.
Some additional customization of the Spotlight search interface is possible, see e.g. BSP, a preference pane to organize search results into different categories.
There are some files that aren't searched by Spotlight, but that should be. One of these is Mathematica Notebooks. There are importers available for many file types now; check the page at Apple's Spotlight Mac OSX web site.
If you want an alternative to Spotlight on Tiger, or a better search engine on Panther, have a look at EasyFind. Its methodology does not rely on indexing, as does Spotlight's.
This is the command-line way. Combined with some scripting, these commands can be very powerful. They also don't rely on indexing, so they actually do what you expect a search to do: look at the data that's really on your disk. You may have encountered the pitfalls of indexing with internet search engines like Google: sometimes the page summary you get in the search results doesn't correspond to the actual contents of the page because the index is not in sync with the web page that is in fact online. For more information on find and grep, invoke the info command from the command line or in emacs and examine the section Basics.
UNIX (and Darwin) has a command called locate which, like Spotlight, makes use of an index database to find files. However, this database is not updated continuously. Instead, one usually sets this up to be updated periodically (perhaps daily) using the command updatedb. So this is a compromise solution between the Spotlight way and the EasyFind Way. It is mostly useful for people who do not have Spotlight, i.e. those not running Tiger, or those who disabled Spotlight completely because they don't want a process interfering whenever something is saved on disk.
If you're interested in trying this approach, it is advisable to not use Apple's version of the shell command, because its indexing function does not handle the prunepaths option correctly (which allows to exclude folders from indexing).Instead, use the version provided by fink. You do this with sudo fink install findutils. The findutils web page provides some online documentation. This package also installs a different version of find. With the fink installation, the automatic database update job is also set up for you (using crontab - an entry is created in /sw/etc/cron.daily/findutils), without any additional work on your part. The update job just runs quietly in the background at the predefined intervals, and all you will then notice is a few minutes of increased disk activity (depending on the size of your file system). The difference to Spotlight is that locate by itself does not search inside files; on the other hand, it leaves the file system alone for most of the day. Of course this way the database typically does not contain changes made in the last few hours, but for a reasonably organized user the need for searching should arise mostly with files older than that.
locate with additional functionality of grep etc. to provide another interesting alternative search tool. The Application allows you to choose fink's locate tool by checking a box in the Preferences. Removable media can be indexed as well. With Locator, you have a fast, cutomizable and "Mac-like" search tool that is more passive than Spotlight but in many practical situations does pretty much the same thing (at least for file name searches), at the same speed. And all this based on UNIX commands that have been around for as long as I can remember.