Skip to Content

Submit your nominations for the Luxist Awards' Best in Decor
AOL Tech

Filed under: UNIX / BSD, TUAW Tips

Monday man page: open

Just a quick hint for today's man page: the open command does just what you might think. It opens files, directories, applications or URLs; no muss, no fuss. For files, you can specify an application to open them with the -a flag (or just trust LaunchServices to pick the right app). If you want to, the -e flag will force them to open in TextEdit.

open ~/Desktop/MyWordDoc.doc [will open in MS Word]
open -e ~/Desktop/MyWordDoc.doc [will open in TextEdit]
open ~/Desktop/*.doc [opens every Word document on the desktop, in Word]
open http://tuaw.com [well, give it a go!]

I use open in installation scripts or other situations where I want a GUI application to come up at the end of a process. For example,

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

launches Software Update and begins checking for available patches. Sure, you can force an update with 'softwareupdate -i -a' anytime, but maybe I want to give the person sitting at the console an opportunity to select the updates needed, or cancel out of the possibly-lengthy update cycle until it's more convenient. You could also use the URL functionality to take people to a 'readme' website... the possibilities are manifold.
jobs & resumes
Lead Blogger

AOL Find a Job - New York, NY (3 weeks ago)

See More Relevant Jobs ›

Reader Comments (Page 1 of 1)

Tip of the Day

Reply in the Mail.app with a specific quote.
Select the text you want quoted and then hit the reply button.
Only your selected text will copied to the reply email.


Follow us on Twitter!
 TUAW [Cafepress]

Featured Galleries

DNC Macs
Macworld 2008 Keynote
Macworld 2008 Build-up
Google Earth for iPhone
Podcaster
Storyist 2.0
AT&T Navigator Road Test
Bento for iPhone 1.0
Scrabble for iPhone
Tom Bihn Checkpoint Flyer Briefcase
Apple Vanity Plates
Apple booth Macworld 07
WorldVoice Radio
Quickoffice for iPhone 1.1.1
Daylite 3.9 Review
DiscPainter
Mariner Calc for iPhone
2009CupertinoBus
Crash Bandicoot Nitro Kart 3D
MLB.com At Bat 2009
Macworld Expo 2007 show floor

 

More Apple Analysis

AOL Radio TUAW on Stitcher