Mac command line utility open can be use to open files, folders, etc. It is pretty handy if you use terminal quite often on mac. Also typing a command is much faster as compare to using gui. Here are few things you can do with open on command line to increase productivity.
Mac – use “open” to open finder window
To open finder window with current directory:
open .
To open finder window with a specific directory:
open [dirname]
Mac – use “open” to open a file with its default application
To open a png file with preview:
open img.png
Mac – use “open” to open a url in default browser
open http://www.google.co.in/
In case default browser is Chrome, it will open new Chrome window or open a new tab if Chrome window is already there.
Few points to note about mac “open”
- You can visit open manual page for detailed documentation on mac open.
- You can also specify a specific application using -a application. Otherwise the default application as determined via LaunchServices is used.