Results 1 to 6 of 6

Thread: Mac - command to run software through terminal

  1. #1
    Join Date
    Mar 2010
    Posts
    200

    Mac - command to run software through terminal

    Hello,
    I have just acquired a Mac, coming from the Linux world, I'm an addict and I sulked terminal mouse. After having hand at installing software on Mac, now I'd like to know how to start it via the terminal. For example, typing "preview abc.pdf" opens the application preview and allows me to read files. pdf. Is there written, the command to type in the terminal which corresponds to the launch of each application? Any help regarding this is appreciated. Thank you for your help.

  2. #2
    Join Date
    Nov 2009
    Posts
    343

    Re: Mac - command to run software through terminal

    Hello,
    Type "man open" in the Terminal lead you to discover "open-e file.txt" (for TextEdit) and "open-a Preview image.tif" (and many other apps: overview). It scrolls through the man pages with the or space, and it is left with Q. If you need any more information on the commands you can just type the command followed by the man and you will get all information.

  3. #3
    Join Date
    Mar 2010
    Posts
    200

    Re: Mac - command to run software through terminal

    But open does not allow me to open a single application, without passing a parameter file name. For example if I want to launch the web browser, I used to type firefox & Linux. It may seem a fuss, but I used to work like that and I did not really have time to change all my habits (I'm mainly spent on MAC as it uses a Unix kernel, so orders + or - identical to Linux, resulting in a loss of time due to the adaptation of the passage Linux -> OS X near zero). For now the solution I found is to create an alias in the . bash_profile for each installed application. But this could have serious long-term, that's why I ask if there is an alternative to this.

  4. #4
    Join Date
    Nov 2009
    Posts
    583

    Re: Mac - command to run software through terminal

    Hello,
    You can try the following ctrl + space and you type firefox entered, and you spotlight starts the application. Otherwise, the command is for safari for example:
    Code:
    / Applications / Safari.app / Contents / MacOS / Safari
    You can try the following for any application in the terminal.

  5. #5
    Join Date
    May 2008
    Posts
    255

    Re: Mac - command to run software through terminal

    Hello,
    Is it really useful to get the binary (Contents / MacOS / Safari)? In a Terminal command: open
    Code:
    / Applications / Safari.app seems well enough?
    And shortcuts can be launched quickly using its software to a Terminal, itself opened with a shortcut. Profile and in my alias
    Code:
    my = "open / Applications / Mail.app"
    and with my in Terminal I launch Mail.

  6. #6
    Join Date
    Nov 2009
    Posts
    356

    Re: Mac - command to run software through terminal

    Here is the code
    Code:
    open-a Safari
    You need to be more specific when you have two versions of an application if it
    will suffice.
    For applications whose name contains a space, think about the double quotes:
    Code:
    Code:
    open-a "Microsoft Word"
    The command is not case sensitive.

Similar Threads

  1. Replies: 1
    Last Post: 03-07-2012, 11:48 AM
  2. Replies: 5
    Last Post: 22-08-2010, 02:39 AM
  3. Software to break a PDF file from the command line
    By AmdUser in forum Windows Software
    Replies: 2
    Last Post: 05-05-2009, 02:48 PM
  4. Group Policy software install with command line switch
    By James Lavery in forum Windows Server Help
    Replies: 4
    Last Post: 08-10-2004, 06:04 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,817,755.66480 seconds with 16 queries