Viewing images from the Terminal in Mac OS X
You can pass multiple images to the Preview app, very nice!

The more I learn and love FreeBSD the more I've been using the Terminal application on my Macs, to the point now where I'm using it more than any other application except perhaps a web browser: for file file compression and management the command line is so much quicker and simpler. As a result I've been trying to modify my workflow to allow me to work inside the Terminal even more, and I thought I'd share some tips I've picked up here.

One such example is viewing images and other media from the Terminal. Just as you probably use the bundled Preview.app to do this when you're in the Finder or from the OPENSTEP days, you can also call it from the Terminal to do the same thing. For example, to load a picture called Geass.jpg:

% /Applications/Preview.app/Contents/MacOS/Preview Geass.jpg

And voila, Preview opens showing you the image you told it to load… from the Terminal! You can pass multiple images seperated with spaces, you can even mix in a few PDFs into your list. The scripting potential is just making me quiver with excitement! Okay maybe not, but still.