Collecting the Internet So You Don't Have To

We work on the Internet. As such, we are constantly consuming information. Believe me, there is a lot of it out there. Sometimes we even forget things unless we write them down. Our blog covers everything from web standards to the muppets, php to comic books, music and everything else that we find interesting. Leave us a note when you drop by.

How to Force Spotlight to Reindex A Volume

Technology
Julian Moffatt
Julian Moffatt CEO / Partner
Visual Lizard
work
1 (204) 957-5520 ext:1
toll-free
1 (888) 237-9559
url
http://www.visuallizard.com
Julian Moffatt Purveyor of Good Times

If you use Apple hardware and run OS X, you may encounter a mildly annoying Spotlight issue from time to time where it will not find a file, or an app.

To correct this issue, there are two things you can try. The first is described in this post (http://support.apple.com/kb/HT2409) by Apple. They tell you to use System Preferences > Spotlight > Privacy (tab). If you drag a folder or hard drive to the Privacy tab, then remove it from there, Spotlight will reindex that item. Sometimes this works.

The second option, which gives you a lot more control, is to fire up the trusty command line found in Applications > Utilities > Terminal and run a couple of commands. The command in question is:

sudo mdutil -E

The -E flag forces Spotlight to erase (hence E) the indicated volume information. If you want to be more specific, such as a folder with your writing in it, or your Applications, you can tailor mdutil as follows:

sudo mdutil -E /volume/path/to/folder

As with all things run in the terminal, when they work, there is no feedback. You just end up back at the command prompt wondering what's up.

For more information on the mdutil functions, you can hit up the Apple Developer documents on mdutil

Note: This is advice on the internet, use at your own risk.