Monday, May 3, 2010

Prevent Spotlight from indexing external hard drives

Handy for those of us who frequently use removable hard drives....

Prevent Spotlight from indexing external hard drives: "If you, like me, get annoyed by the index files Spotlight creates any time you create an external hard drive, you might want to try this hint. We're going to set up a launchd service which runs a script every time a hard drive is mounted. This script will touch the .metadata_never_index file (which prevents Spotlight from creating the index; see this hint) on the hard drive.

Let's start with the launchd service. Open Terminal and type the following, then press Return:

$ cd ~/Library/LaunchAgents/ 

Create the file com.index.no_index.plist with your favorite editor (vi, nano, etc.), and insert the following XML code:

<?xml version='1.0' encoding='UTF-8'?>...

Add to diggAdd to RedditAdd to SlashdotEmail this ArticleAdd to StumbleUpon

"

 

(Via MacOSXHints.com.)

No comments: