Open a file or folder.
The open command opens a file (or a folder or URL), just as if you had double-clicked the file's icon.
Syntax open [-a application] file ... open [-e] file ... Key -a Specify the application to use for opening the file -e Edit the file (with /Applications/TextEdit)
If no application name is specified, the default application as determined via LaunchServices is used to open the specified files.
You can specify one or more file names (or pathnames), which are interpreted relative to the shell or Terminal window's current working directory. e.g. open *.doc
Open the current terminal working directory
$ open .
Open demo.txt in the default application (as determined by LaunchServices).
$ open /Volumes/Macintosh HD/demo.txt
$ open file://localhost/Volumes/Macintosh HD/demo.txt
Open a folder in the Mac Finder.
$ open /Volumes/Macintosh HD/Applications/
$ open file://localhost/Volumes/Macintosh HD/Applications/
Open demo.txt with a specific application (in this case, TextEdit).
$ open -a /Applications/TextEdit.app /Volumes/Macintosh HD/demo.txt
Open a URL
$ open http://ss64.com/
Edit demo.txt (will open in TextEdit)
$ open -e /Volumes/Macintosh HD/foo.txt
“Clothes make the man. Naked people have little or no influence on society” ~ Mark Twain
open man page - Apple.com
echo - Display message on screen
tee - Redirect output to multiple files
The less home page (Mark Nudelman)
Article: TA24770 - Clear the Finder "Open With" contextual menu (rename /Library/Preferences/com.apple.LaunchServices.plist).