Ronny Lam

about://tech

Howto Not Index Thumbdrives With Mac OS X

The last couple of weeks I started to use a lot more memorycards and usb thumdrives, for whatever reason. But one thing that started to annoy me was that Mac OS X is by default indexing those drives. And for that purpose they get a whole lot of default hidden files. At least hidden on the Mac, because in other OS’s, for example my Nokia bike-phone, it shows a lot of dot-files:

1
2
3
4
5
6
$ ls -a /Volumes/Untitled
.Spotlight-V100
.Trashes
._.Trashes
.disk
.fseventsd

Looking around I found a hint to put /Volumes in the Privacy tab in the Spotlight preferences, but there was no way I could get the /Volumes visible in either the selection pane or Finder itself. I could see it in the Terminal of course. Since the only possibility was that it was handled as a system-folder and that system-folders are not visible in the Finder. I could not find a setting in the Finder preferences to show system-folders, but a search on the web gave another hint:

1
2
defaults write com.apple.finder AppleShowAllFiles **TRUE**
killall Finder

After that I could see the /Volumes directory in the Finder and drag it to the Privacy tab of the Spotlight preferences.

And because I hate to see .DS-Store and such on my Desktop I switched it back after the job:

1
2
defaults write com.apple.finder AppleShowAllFiles **FALSE**
killall Finder

I have done nothing new, just combining other information.