Using Mavericks, how can I prevent Spotlight from indexing all drives except my primary internal drive? In my work, I connect dozens of new drives every week, and I do not want the .Spotlight-V100 folder to be created on them.
I know I can add each drive to the Spotlight privacy list, but that can only be done after connecting the drive, and then the .Spotlight-V100 folder has already been created.
I could disable Spotlight completely, but then I lose the convenience of indexing my internal drive. I want to use Spotlight for my internal drive only, and disable it for all other drives, including ones that have yet to be connected.
Best Answer
A file called
place in the root of any volume will suppress indexing behaviour.
You can generate this file automatically
the following files need to be created as root
the following shell script will create the requisite file should an active (less than 30 days old) spotlight entry not be found.
to create this
or use your preferred text editor
The contents should be
make sure it can be executed...
now add an entry to launchd, create the file
to create this
with contents
now activate the job
the job will launch every time you mount a disk, look in the console for messages filtered by 'unindex' for it's actions e.g. from my machine