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

Kill processes by name UNIX
In the hint about moving the dock to the top of the screen, the method of killing and restarting the dock was unnecessarily complicated.

Since 10.2 there's a much simpler way:
  % killall Dock
Of course this works for all processes, not just the dock.

[Editor's note: You can use the "-d" option if you'd like to see a description of the processes that 'killall' killed. Personally, I'll continue to use the harder method, as I still fear killing an unintended process if I do something stupid like think "Dock" but type "Finder!"]
    •    
  • Currently 5.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[7,202 views]  

Kill processes by name | 6 comments | Create New Account
Click here to return to the 'Kill processes by name' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Wrong author!
Authored by: mrsid on Oct 21, '02 10:25:58AM

I submitted this hint, but it is credited to yorgoS.



[ Reply to This | # ]
for the paranoid
Authored by: robh on Oct 21, '02 12:02:00PM
Here's a Perl script that prompts for confirmation to kill processes by name: http://www.imdb.demon.co.uk/OSX/killit Run it like this example.. killit dock clock To kill running processes with 'dock' and or 'clock' in their name.

[ Reply to This | # ]
Fixed!
Authored by: robg on Jun 17, '03 09:06:57AM

OK, so it took me a few months to notice your comment :-), but I've now corrected the attribution -- sorry about that!

-rob.



[ Reply to This | # ]
finder
Authored by: Tiresias on Oct 21, '02 05:47:10PM

I agree that there are processes that you wouldn\'t want to kill but Finder is not one of them. I used to kill it all the time to get the extra process power it took. But then tinker tool allowed me to add \"Quit Finder\" to the finder menu. The finder is not your system.



[ Reply to This | # ]
use AppleScript, too
Authored by: Krioni on Oct 22, '02 04:19:22PM

Hey all.

I just use AppleScript, if I want to quit things:

tell application "Dock" to quit -- in Script Editor, etc

Or, from the command line:

osascript -e 'tell application "Dock" to quit'

That will do it, too, and no worries about killing something incorrectly.



[ Reply to This | # ]
AppleScript
Authored by: skab on Oct 22, '02 08:30:40PM

Yes, use the AppleScript one, it's the highest-level way to restart the Dock, so the thing will shut down gracefully any time.



[ Reply to This | # ]