Terminal command needed

Discussion in 'macOS' started by CaptainCaveMann, Dec 17, 2006.

  1. CaptainCaveMann macrumors 68000

    CaptainCaveMann

    Joined:
    Oct 5, 2004
    #1
    Anyone know the command to close apps in Terminal? Thanks for any and all help! :p
     
  2. TheLee macrumors member

    Joined:
    Aug 5, 2006
  3. CaptainCaveMann thread starter macrumors 68000

    CaptainCaveMann

    Joined:
    Oct 5, 2004
    #3
    Kill? I just need the command to close apps in Terminal. Also anyone know the command to open new tabs in Safari?
     
  4. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #4
    You mean like in GUI programs?

    For many apps, this will work (and it's the nicest way, because it will be an orderly exit):

    $ osascript -e 'tell app "Super EDLIN Pro" to quit'

    If not, you can try:

    $ killall "Super EDLIN Pro"

    And if that doesn't do it to it (really hung),

    $ killall -9 "Super EDLIN Pro"
     
  5. oingoboingo macrumors 6502a

    oingoboingo

    Joined:
    Jul 31, 2003
    Location:
    Sydney, Australia
    #5
    It's often Control-C to quit a program running inside Terminal. As TheLee mentioned, the 'kill' command can be used to kill any process running on the system, but you need to know the process ID (or PID) of the process you wish to kill first. You can find this out using the 'ps' or 'top' commands, or the Activity Monitor in the Utilities folder.

    In fact, the Activity Monitor can be used to kill processes specifically by their process ID just like 'kill' can. This may be easier for you if you're not experienced with the Terminal or UNIX commands, although using the Force Quit option from the Apple menu might be safer and easier again.

    Type 'man kill' at the Terminal (without the quotes) for more information on how the kill command works.
     
  6. CaptainCaveMann thread starter macrumors 68000

    CaptainCaveMann

    Joined:
    Oct 5, 2004
    #6
    Yes for commanding GUI programs in Terminal. Also if im in cd /etc how do i switch back to user? I also tried listing files in cd/ etc with the 1s command and its not working. I just get a -bash.
     
  7. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #7
    Just plain old cd without any command switches will move you back to your home directory.

    You have the one-vs-lowercase-L problem there. The command is ls, short for "list".
     
  8. CaptainCaveMann thread starter macrumors 68000

    CaptainCaveMann

    Joined:
    Oct 5, 2004
    #8
    Ahhhhh! You guys are awesome, thanks! Also can you guys recomend a good book or source i can use to learn more Terminal commands in Tiger specifically?
     
  9. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #9
    The O'Reilly books tend to be really good for covering the useful stuff. This one ought to be a pretty good shell crash course. Peek at the related titles too, they also have a "Learning Unix" book and a few other titles, depending on how much learning you have (or want) ahead of you.
     
  10. CaptainCaveMann thread starter macrumors 68000

    CaptainCaveMann

    Joined:
    Oct 5, 2004
    #10
    OK thanks! Can i add you to my buddy list on aim? :)
     
  11. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #11
    You can, but I'm rarely logged in there :D I do read my email though, my username at gmail.com or mac.com works.
     
  12. Osarkon macrumors 68020

    Osarkon

    Joined:
    Aug 30, 2006
    Location:
    Wales
    #12
    To get back to user, type cd .. it takes you up one directory level. you can keep doing that until you're back at the user.
     
  13. Klian macrumors newbie

    Joined:
    Sep 3, 2006
    #13
    Another way to kill,

    Type:

    Code:
    ps -aux
    An you receive a big list like this:
    Code:
    klian     5283   0.0  1.4   398088  14728  ??  S    12:54PM   0:28.98 /Applications/Adium.app/Contents/MacOS/Adium -psn_0_121634817
    Then type:

    kill -9 5283

    :)
     
  14. TheLee macrumors member

    Joined:
    Aug 5, 2006
    #14
    it might be easier to add the c operator, a la
    Code:
    ps -auxc
    that way you can skip the (sometimes very long) directory entires and just see what the program is.
     

Share This Page