Last active
May 3, 2017 03:35
-
-
Save ssaadh/31c5729726a1f28b500c4d501d1879d2 to your computer and use it in GitHub Desktop.
Spotlight Rebuilding Ugh!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Turn off spotlight. | |
sudo mdutil -a -i off | |
# Remove the index files. | |
sudo rm -rfv /.Spotlight-V100 | |
# Turn on spotlight. | |
sudo mdutil -a -i on | |
# Reindex all mounted /Volumes | |
sudo mdutil -aE | |
# if above doesn't work like it didn't work for me | |
sudo mdutil -i on /Volumes/* | |
# Disable Spotlight | |
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist | |
# Enable Spotlight | |
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment