Mac command line utility open – some handy tips for better productivity

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-utility-open

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”

  1. You can visit open manual page for detailed documentation on mac open.
  2. You can also specify a specific application using -a application. Otherwise the default application as determined via LaunchServices is used.
Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit

Comments

Click here to write/view comments