Launch Applications from TerminalTweet
When working inside a terminal window, there’s a quick shortcut you can use to open a file (read, launch an application on a specific file or set of files). The beauty of this trick is that the command will work as if you clicked on an application icon(s) in Finder. For example, if you request to open a file with an extension of xml, the application associated with that extension will be started and the specified file will be passed to the application.
The command I am referring to is open; read on to see a few examples:
From a terminal window, to all the files with a “.rb” extension (in the current directory):
> open *.rb
To launch a browser at a specified URL, try this:
> open http://macDeveloperTips.com
And to open Finder in the current directory:
> open .
You can get more information about using the open command by viewing the manual page:
> man open