Mac Forums

Mac Forums (http://www.mac-forums.com/forums/)
-   OS X - Operating System (http://www.mac-forums.com/forums/os-x-operating-system/)
-   -   Launching apps from terminal (like linux?) (http://www.mac-forums.com/forums/os-x-operating-system/142184-launching-apps-terminal-like-linux.html)

systix 02-19-2009 03:25 PM

Launching apps from terminal (like linux?)
 
One of the things I miss in OS X compared to linux (ubuntu) is the ability to easily launch applications from the terminal, with or with out parameters to open files in that application.

Eg if i wanted to edit a document on linux I would type
Code:

gedit ~/files/example.txt
In OS X I dont seem to be able to do this, is there a way?
I know I can add an alias entry for each program to just run it like below:
Code:

alias tx 'open /Applications/TextEdit.app/'
but what happens if i want to open a file with this application as I know the command is different (using the -a option).

Is there any way to get OS X to work like linux in this way?

thanks.

MacsWork 02-19-2009 04:06 PM

open /Applications/TextEdit.app ~/File.txt

Assuming there is File.txt in the root of your home directory

technologist 02-20-2009 10:57 AM

Quote:

Originally Posted by MacsWork (Post 807310)
open /Applications/TextEdit.app ~/File.txt

or just

Code:

open ~/File.txt
(to open it with whatever the default application is for that file)


All times are GMT -4. The time now is 08:44 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.