Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

g-boac

macrumors 6502
Original poster
Oct 7, 2007
291
1
Quick question. I have a window on my work Mac that keeps "hanging" open from Norton Anti-Virus. This "hanging" window also keeps me from ejecting my jump drive or external hard drive. If I go to "Force Quit Applications", it doesn't show up as a running application.

[a] What command in Terminal do I type to list running processes?
Once I know the name of the process, what command in Terminal to I type to kill it?

thanks!
Mark
 
top is an interesting choice and not one I would use in this situation.

ps -auxw will give you a list of the current processes.

One of the columns is the process ID (PID).

To gracefully kill a PID: kill <PID>
To forcefully kill a PID: kill -9 <PID>
 
top is an interesting choice and not one I would use in this situation.

ps -auxw will give you a list of the current processes.

One of the columns is the process ID (PID).

To gracefully kill a PID: kill <PID>
To forcefully kill a PID: kill -9 <PID>
thanks! Questions:
[a] is top a command to be used with caution?
what's the difference between killing a process "gracefully" vs "forcefully"?

thanks!
Mark
 
top can be used without worry.

Killing gracefully means asking the app to shutdown. Killing forcefully terminates it without being cautious about it.
 
I thought it was ps -au [author name]?

Code:
$ ps -auxw
ps: No user named 'xw'

They must have changed it then. I believe you had to use -auxw in older OS X releases. ps -ef should work then.

EDIT: On my AppleTV running 10.4, it uses ps -auxw:
Code:
bash-2.05b# ps -ef
ps: illegal option -- f
usage: ps [-aACcehjlmMrSTuvwx] [-O|o fmt] [-p pid] [-t tty] [-U user]
       ps [-L]
bash-2.05b# ps -auxw
USER       PID %CPU %MEM      VSZ    RSS  TT  STAT STARTED      TIME COMMAND
root       278   3.0 57.1   199368 149704  ??  Ss   Sun01AM  43:44.49 /Users/frontrow/Library/PreferencePanes/MouseLocator.prefPane/Contents/Resources/MouseLocatorAgent.app/Contents/MacOS/MouseLocatorAgent
root        49   0.2  0.9    31828   2408  ??  Ss   Sun01AM  45:29.39 /usr/sbin/coreaudiod
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.