how to open Disk Utility.app through Terminal?

Discussion in 'Mac Apps and Mac App Store' started by innvaderr, Sep 17, 2008.

  1. innvaderr macrumors newbie

    Joined:
    Sep 17, 2008
    #1
    can someone tell me the command to open Disk Utility through terminal?
    I tried the following with no success;
    open -a disk utility
    open /Applications/Utilities/Disk Utility.app

    thanks:confused::apple:
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    A .app is not a file. It's a directory that appears to be a file in the finder. Which is why you can't open it via that method.

    You don't need to use the open utility: just run the executable within the .app container:

    Code:
    /Applications/Utilities/Disk\ Utility.app/Contents/MacOS/Disk\ Utility
    Not the \ escapes for the spaces in the name are important.

    Edit to add: the spaces are the reason your second open command doesn't work. The space ends the name of the application there so it's trying to open "/Applications/Utilities/Disk" which doesn't exist. You can make the open command work like this:

    Code:
    open "/Applications/Utilities/Disk Utility.app"
    or

    Code:
    open /Applications/Utilities/Disk\ Utility.app
     
  3. innvaderr thread starter macrumors newbie

    Joined:
    Sep 17, 2008
    #3
    thanks robbieduncan,

    makes much more sense now!
     

Share This Page