Quantcast
Channel: macosxhints.com storage device tips
Viewing all articles
Browse latest Browse all 21

Prevent Spotlight from indexing external hard drives

$
0
0
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"?&g ...

Viewing all articles
Browse latest Browse all 21

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>