Taming spotlight to not index external drives at all in OS X

Did you ever had this problem of saving stuff to an external usb or firewire drive (FAT32 or HFS) and then spotlight starting to index it (thus slowing all file operations on that drive down) and then you turning to System Preferences / Spotlight / Privacy and adding that drive to the list therein. Then spotlight switches off. You finish moving your files around and unplug the drive. A few days later you plug it in again, and that stupid spotlight kicks in again trying to index everything on the drive you just plugged in. How cool is that :( ?

I hated this and had no idea why this is happening and wanted a solution. It turns out that some people have already found a solution.

All you need to do is create a file in the root of the drive which contents you do not want to be indexed by spotlight. The name of the file is:

.metadata_never_index

If you have no idea how to do that, just open up Terminal.app, and change to the root of it. (Usually in /Volumes/[name_of_external_drive]) So:

cd /Volumes/[whatever]
touch .metadata_never_index
(if the above fails try sudo touch .metadata_never_index)

That’s all folks!


About this entry