Disable spotlight for USB thumbdrives?

All,

Is there a way to prevent OSX from doing a Spotlight inventory of every USB drive that I plug into my MacBook? What I mean is, every time I plug a USB thumb drive into my laptop, and then take it over to a Linux or Windows machine, I notice that OSX has written three files to the drive:

.Spotlight-V100
.Trashes
._.Trashes

I want to disable this feature, just for USB drives.

Hints?

MacBook Pro, Mac OS X (10.5.2), 2 GB RAM, all the latest stuff ...

Posted on Mar 27, 2008 4:47 PM

Reply
3 replies

Mar 31, 2008 6:54 AM in response to _Bones_

Go to terminal and type:

man mdutil


Scroll using the space bar, and press q to finish.

You will then know what you are about to do (and how to undo it).

Now, type

sudo mdutil -i off /Volumes/MYUDBDRIVE


This should disable Spotlight for MYUSBDRIVE (insert your USB drive name here). AFAIK this is persistent across sessions (I have not tested this).

Mar 27, 2008 4:56 PM in response to SurfBoy

If you open Spotlight Preferences in System Preferences, and select "Privacy" and then click the little + sign just below the bottom of the white window, you will open a browser.
Select your FlashDrive and SL will not browse it.
You will probably have to do this for each FlashDrive.
I don't know if the selection will "stick" since it's removable, but it's the only selection other than using some 3rd party apps, which I am not familiar with.

Mar 31, 2008 6:39 AM in response to nerowolfe

Hm. I have this problem too.

Played with this a bit, but doesn't seem to work 100% of the time. I can alter the settings as you described, but they are only good until I eject the USB drive.

More specifically:

1. Plug in USB thumb drive.
2. Go to Spotlight settings (described above) and select my drive to be excluded from Spotlight indexing.
3. Work a bit.
4. Eject (remove) USB thumb drive.
5. Check Spotlight settings, and notice that USB device is no longer in the the "exclude" (or privacy) list.

It would seem that the "privacy" settings are not persistent across sessions. Once you eject, all bets are off and you have to redo this process every time.

If there is no built-in way to do this, perhaps scripting could take care of this ... ?

Someone has to have had this problem before we did?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Disable spotlight for USB thumbdrives?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.