Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5.x: Completely disable Spotlight' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5.x: Completely disable Spotlight
Authored by: nyteschayde on Mar 04, '08 12:27:06PM
For 10.5 I source this script into my /etc/bashrc and use it to control spotlight:

#!/bin/sh

# restore it
function spotlightOn() {
  sudo chmod 775 /Library/Spotlight;
  sudo chmod 755 /System/Library/Spotlight;
  sudo chmod 755 /System/Library/PreferencePanes/Spotlight.prefPane;
  sudo chmod 755 /System/Library/Services/Spotlight.service;
  sudo chmod 755 /System/Library/CoreServices/Spotlight.app/Contents/MacOS/Spotlight;
  sudo chmod 555 /usr/bin/mdimport;
  sudo chmod 555 /usr/bin/mdcheckschema;
  sudo chmod 555 /usr/bin/mdfind;
  sudo chmod 555 /usr/bin/mdls;
  sudo chmod 555 /usr/bin/mdutil;
  sudo chmod 555 /usr/bin/md;
}

# kill it
function spotlightOff() {
  sudo chmod 0000 /Library/Spotlight;
  sudo chmod 0000 /System/Library/Spotlight;
  sudo chmod 0000 /System/Library/PreferencePanes/Spotlight.prefPane;
  sudo chmod 0000 /System/Library/Services/Spotlight.service;
  sudo chmod 0000 /System/Library/CoreServices/Spotlight.app/Contents/MacOS/Spotlight;
  sudo chmod 0000 /usr/bin/mdimport;
  sudo chmod 0000 /usr/bin/mdcheckschema;
  sudo chmod 0000 /usr/bin/mdfind;
  sudo chmod 0000 /usr/bin/mdls;
  sudo chmod 0000 /usr/bin/mdutil;
  sudo chmod 0000 /usr/bin/md;
}

# clear indices
function spotlightCleanup() {
  sudo rm -rv /.Spotlight-V100;
  sudo rm -rv /private/var/tmp/mds;
}



[ Reply to This | # ]