Women in Technology

Hear us Roar



Article:
  Learning the Terminal in Jaguar, Part 1
Subject:   Safari
Date:   2005-06-07 14:18:59
From:   xurizaemon
Response to: Safari

Yes. In Terminal, you can use the "open" command to open files, URLs, or applications.


## launches a specific application
## (maybe can give URL or file as argument?)
$ open /Applications/Safari.app


## goes to www.oreillynet.com
## in your preferred browser
$ open http://oreillynet.com/


## opens /Documents/MyFile.txt in your home dir
## using default text editor
$ open ~/Documents/MyFile.txt


## opens your Pictures folder in Finder
open ~/Pictures


Pretty easy, huh? Basically, the 'open' command simulates what you'd normally do with a double-click or CMD+O.