quick Terminal command help

Discussion in 'Mac Basics and Help' started by g-boac, Apr 1, 2009.

  1. g-boac macrumors 6502

    Joined:
    Oct 7, 2007
    #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
     
  2. swiftaw macrumors 603

    swiftaw

    Joined:
    Jan 31, 2005
    Location:
    Omaha, NE, USA
    #2
    1. top
    2. killall <name of process> e.g killall Dock
     
  3. belvdr macrumors 601

    Joined:
    Aug 15, 2005
    #3
    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>
     
  4. g-boac thread starter macrumors 6502

    Joined:
    Oct 7, 2007
    #4
    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
     
  5. belvdr macrumors 601

    Joined:
    Aug 15, 2005
    #5
    top can be used without worry.

    Killing gracefully means asking the app to shutdown. Killing forcefully terminates it without being cautious about it.
     
  6. g-boac thread starter macrumors 6502

    Joined:
    Oct 7, 2007
  7. aross99 macrumors 68000

    aross99

    Joined:
    Dec 17, 2006
    Location:
    East Lansing, MI
    #7
    You can use Activity Viewer for this also - and you get a GUI to boot...
     
  8. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #8
    I thought it was ps -au [author name]?

    Code:
    $ ps -auxw
    ps: No user named 'xw'
    
     
  9. belvdr macrumors 601

    Joined:
    Aug 15, 2005
    #9
    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
    
     

Share This Page