Created
June 10, 2021 10:45
-
-
Save JohannesHoppe/91890618b56f90175c54a0c966f3e4ce to your computer and use it in GitHub Desktop.
fix_spotlight.sh
This file contains hidden or 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 | |
# Force rebuild the spotlight index from scratch. | |
# --> https://apple.stackexchange.com/a/74892 | |
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment