Shell: Reindexing Spotlight on your Mac

Spotlight indexing can slow your machine if you have low memory. Doing it repeatedly may stop your machine from working. This problem is a common occurrence with Mac machines. As I am a Mac user, I wrote a simple shell script that will help your Spotlight to stop reindexing your installed drive(s). This Shell script is all you need. Save it to with any filename you want (mine’s ReindexSpotlight.sh) and make sure to put it in a folder you can access easily (Documents folder for example).

How to use

Using Terminal, you can call the script with sh /Documents/ReindexSpotlight.sh