Finder-Terminal: A Joint Venture

Mac OS X includes a number of deft integration tools that make the transition from the Terminal to the Finder (and back) as easy as possible—as you’re about to find out.

Opening the Current Directory in the Finder

If you type open . (note the trailing period) in Terminal, the Finder opens the directory you were perusing in Terminal. If you type open .., the Finder opens the directory’s parent folder (the one that contains it).

You can also type open plus the full path to any directory; once again, the actual Finder folder pops open. This trick is especially useful for opening folders that are typically hidden from view in the Finder, like /var/etc or /var/httpd (although you could always open such folders using the Go Go to Folder command).

Opening URLs from the Command Line

You’re working along in Terminal when you suddenly remember that you want to check the new QuickTime trailers on Apple’s Web site. You could always grab the mouse, move to the Dock, click your Web browser’s icon, click in the address bar, and then type the URL.

Or, if you’re feeling particularly smug, you could also pull a power-user move and just type open http://www.apple.com/trailers/. Your Web browser opens and loads the page whose address you typed.

Tip

Opening URLs from the Command Line

-double-click any Web address that appears in Terminal to visit that page in your default Web browser.

Opening Files from the ...

Get Mac OS X Power Hound, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.