For all you Leopard users out there, here's a handy tip on how to use Quick Look from the command line.
Leopard ships with a command called qlmanage. The -p option shows a preview of the file passed to the command. In the terminal, type the following:
qlmanage -p thefile
As you'll see, it also generates a ton of text output when run. You can prevent this by creating the following shell script:
#!/bin/bash
qlmanage -p "$@" >& /dev/null &
The >& /dev/null prevents output from displaying, and the final & runs the process in the background so a new prompt displays in Terminal. Save this script as an executable file and store it somewhere in your PATH (I stored mine in a home bin folder used for custom-made scripts). I recommend naming it something short like ql.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20071104012738617