Explore the Latest Monday Man Page: Open Now

In today’s quick tip, let’s explore the versatility of the open command. This handy tool allows you to access files, folders, applications, or even URLs effortlessly.

When opening files, you have the option to specify which application should launch them using the -a flag, or you can let LaunchServices decide on the most suitable application. Alternatively, the -e flag ensures the file opens in TextEdit, if that’s your preference.

Here are a few examples of how to use the open command:

open ~/Desktop/MyWordDoc.doc [opens with MS Word by default]
open -e ~/Desktop/MyWordDoc.doc [forces opening in TextEdit]
open ~/Desktop/*.doc [opens all Word documents on the desktop with MS Word]
open https://www.tuaw.com [try it out!]

I find the open command particularly useful in installation scripts or when I need a graphical user interface application to start at the end of a process.

For instance:

open /System/Library/CoreServices/Software Update.app/

This command triggers the Software Update utility and starts checking for updates. While it’s possible to initiate updates via the command line with ‘softwareupdate -i -a’, using open provides a user-friendly way for someone at the console to manage the updates—choosing which to apply or postponing the update process until a more convenient time.

Share This Article

Jeffrey is a dedicated writer for TUAW, bringing readers the latest news and insights on all things Apple. With a deep love for technology, Jeffrey has a knack for breaking down the complexities of the iPhone, iPad, MacBook, and Apple Watch into easy-to-understand articles. His engaging writing style and thorough research make him a trusted voice in the Apple community. When he’s not writing, Jeffrey enjoys exploring new apps and testing out the latest Apple gadgets.