Created
April 4, 2014 13:45
-
-
Save bg5sbk/9974997 to your computer and use it in GitHub Desktop.
Disable or enable spotlight on Mac OS
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 | |
if [ ! $# == 1 ]; then | |
echo "How To Use:" >&2 | |
echo " ./spotlight.sh [load|unload]" >&2 | |
exit | |
elif [ ! $1 == 'load' ] && [ ! $1 == 'unload' ]; then | |
echo "How To Use:" >&2 | |
echo " ./spotlight.sh [load|unload]" >&2 | |
exit | |
fi | |
sudo launchctl $1 -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist | |
echo "Please reboot to take effect" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment