Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Everytime I put a USB Flash Driver the Mac OS X creates 2 folders .Trash and .Spotlight-V100. Is it possible to disable this operation?

share|improve this question

3 Answers 3

Well, I know that there is utilities to do this, but I can't recall the name right now...

But my Google-Foo, is working today...

> cd /Volumes/your\ target\ volume sudo
> touch .metadata_never_index

This hidden file is recognized by both Leopard and Snow Leopard (Possibly Tiger too).

But it will not stop a spotlight index that is currently being created... So add the drive to the privacy panel of Spotlight, add the file, and then remove it from the privacy panel.

Doing so will erase the contents of the spotlight index on the drive in question, prevent it from being re-indexed...

share|improve this answer
This answer does not address the question does it? –  conny Apr 1 '10 at 10:04
It answers half the question, the .Spotlight-V100 folder is the spotlight index for that drive. Thus by creating .metadata_never_index, it will prevent the spotlight index for that drive from being created. –  Benjamin Schollnick Apr 27 '10 at 14:34

Not for any arbitrary USB flash drive you might insert (at least I don't think so). However, for a particular USB flash drive, check this out.

Executive summary: Create two files, named .metadata_never_index and .Trash in the root directory of the USB flash drive. You'll have to manually remove any existing Spotlight or Trash folders that already exist.

share|improve this answer


mdutil can turn off spotlight on network drives, but there's no way to stop it indexing removable drives (short of inserting the drive and then telling spotlight not to index that drive of course - but you're looking for something to stop it happening for all removable drives, always, not just the drives where you've manually turned it off)

For trash, there are similar workarounds to make OS X not actually use the trash folder - eg, create a file called .Trash so that OS X can't later create the directory called .Trash. Again, this only works for devices you've manually exempted, it isn't a blanket ban on OSX doing this on all deices.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.