I use Snow Leopard. How I can send a html page to a web browser from Terminal.app?
If I am in $HOME dir, with a file myPage.html, can I view this file in a browser right from Terminal.app?
Yes, to open a file from the Mac OS X terminal you can use the
You can specify the application to use for opening the file with the
In your case, to open a HTML file with a browser from the terminal, use this command:
Or, you can omit the
...to open it with the default browser. (2)
1) : Usually this is the application that was used to create the file. You can change this via the "Get info..." window. (Select the file, then hit CMD + I.)
2) : Be aware that this method may not work depending on the application set to open the file. This may be done for one or for all files. Typically, on a web developer computer, the application set to open HTML files will likely be a text or code editor.