Terminal

Discussion in 'Mac Programming' started by pacman7331, May 21, 2006.

  1. macrumors regular

    pacman7331

    Joined:
    Apr 5, 2006
    #1
    Forgive me for my stupidity...
    But how does one from the terminal command line interface LAUNCH A APPLICATION!??!?

    I type the name and it doesn't like that... I'm looking in my o'reilly book and it's also not helpful so far...

    Anyone know how? seems pretty simple thing to do... I know how to kill and app but not how to "open" one
     
  2. macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #2
    "open"? :p

    like,
    Code:
    open /Applications/Utilities/Disk\ Utility.app
    
    opens Disk Utility for me.
     
  3. thread starter macrumors regular

    pacman7331

    Joined:
    Apr 5, 2006
    #3
    fantastic .. (!) ok hah
     
  4. macrumors 6502a

    Joined:
    Jun 17, 2003
    #4
    As another poster has pointed out, the "open" command does what you are asking for.

    The more detailed answer is that most "commands" you enter at the command line, such as "open", "tar", "zip", "ls" are all executable programs.

    An OS X application like Safari or DiskUtility are not executables. Instead, they are actually a folder that contains a specific structure and set of files inside the folder. The actual executable is stored in the Safari.app/Contents/MacOS/ folder. For DiskUtility, the actual executable is /Applications/Utilities/DiskUtility.app/Contents/MacOS/Disk Utility. You can run this executable directly, but the cleaner way is to use the "open" command.
     

Share This Page