Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For music making, I am writing a bash script (well, list of pkills or my own updated version) in OS X to remove unnecessary CPU-using programs. Even if I am forced to reboot afterwards, I do not mind. I need CPU use (and memory use, perhaps more importantly) at a bare minimum.

I have tried killall Finder which seems to just restart the finder. I know that Path Finder actually kills the Finder so that it doesn't restart, but I don't know how they do that. My questions are:

  1. How can I kill the Finder and Spotlight so that they do not restart?
  2. Once this works, to reboot I can always hardboot. If not, what is my lowest CPU-usage way to initiate a reboot process correctly? Leave a Terminal window open?

Note: Although this is kind of implicit in the question: I do NOT want any changes to be persistent after rebooting.

Update: I might use sudo mdutil -i off / to shut off Spotlight indexing. Is this a good idea?

share|improve this question
up vote 3 down vote accepted

Your performance gain by doing either of these is so miniscule as to not be worth it. If you have a pre-10.6 machine you can save a bit of RAM by not having too many items on your desktop.

If you insist you can add a quit option to the Finder with:

defaults write QuitMenuItem -bool YES

You have to restart for the Quit to show up, and you won't see what's on the desktop once you Quit the Finder.

Your command for spotlight is correct for the boot, but you can also specify other drives in place of /. You may find that Spotless shuts down more processes, and it is great if you are plugging in many drives and don't want them to automatically be indexed.

share|improve this answer
All good stuff, and true about performance gain, but I'm quitting many many annoying processes like ituneshelper and evernote helper and anything that doesn't bring my system to its knees. So every little bit counts. – Dan Rosenstark Dec 22 '09 at 18:12
You might benefit by creating a new user to do your audio work that doesn't have Evernote and other 3rd party applications installed. It would be easier than quitting all sorts of processes, and you could use /Users/Shared to pick up files from your regular account. – ridogi Dec 22 '09 at 19:01
That would be cool. I'll see what kind of serial number problems I have in doing that... – Dan Rosenstark Dec 22 '09 at 19:03
If your applications are installed to /Applications instead of your User folder you should have no problems at all. – ridogi Dec 22 '09 at 19:15
Thanks for that. I'll comment back with the outcome. – Dan Rosenstark Dec 22 '09 at 20:09

Using mdutil to turn off Spotlight indexing will turn off Spotlight indexing for that drive across boots. If you have multiple drives however it will still index other drives as the last argument is meant to specify what drive.

You can safely quit the Finder from the GUI by adding a Quit menu item to the Finder menu using the command: defaults write QuitMenuItem -bool YES. Also using kill instead of killall tends not to restart the Finder.

share|improve this answer
so you means that I will need to mdutil ... on, even if I reboot? – Dan Rosenstark Dec 22 '09 at 18:11
kill tends to have the Finder restart. Not sure who is doing it, though. – Dan Rosenstark Dec 22 '09 at 18:13
in 10.6 (not sure before) the QuitMenuItem 1 doesn't work. Must be -bool YES like in ridogi's answer. – Dan Rosenstark Dec 22 '09 at 18:34
I believe QuitMenuItem 1 will work in 10.4 and possibly older versions, but I don't know how far back. – ridogi Dec 22 '09 at 19:17
@ridogi - Thanks. I've corrected that. – Chealion Dec 23 '09 at 0:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.