Use Quick Look from the command line

Dec 24, 2007 - 3 Comments

Quick Look is a nice feature added in 10.5, I use it often for glancing at the content of various documents and it certainly beats launching an application. If you’re an avid command line user though, you may be browsing through a directories contents and wondering just what is that JPG or DOC file. Wonder no more, because you can easily use Quick Look from the command line:

From the command line, use the following syntax:

qlmanage -p filename.jpg

This will launch a Quick Look window with whatever file is specified as ‘filename.jpg’, the file type can be anything that Quick Look is compatible with (which seems to be just about everything).

The qlmanage command has other abilities, here is the full flag list, courtesy of qlmanage -h:


Usage: qlmanage [OPTIONS] path...
-h Display this help
-r Force reloading Generators list
-p Show a preview of the documents
-t Show thumbnails of the documents
-s size Size for the thumbnail
-f factor Scale factor for the thumbnail
-c contentTypeUTI Force the content type used for the documents
-g generator Force the generator to use

Note that you can have Quick Look launch in the background by using the following command, allowing you to continue using the Terminal as usual:

qlmanage -p filename.jpg &

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Bill Ellis in 10.5, Command Line, How to, Leopard, Mac OS X, Tips & Tricks

3 Comments

» Comments RSS Feed

  1. Brett A. Rogers says:

    That is just fantastic! Thanks for that tip.

  2. [...] Quote from the article: Quick Look is a nice feature added in 10.5, I use it often for glancing at the content of various documents and it certainly beats launching an application. If you’re an avid command line user though, you may be browsing through a directories contents and wondering just what is that JPG or DOC file. Wonder no more, because you can easily use Quick Look from the command line: [...]

  3. advoldfuddy says:

    А как вы думаете, можно открыть на сайте-блоге раздел или типа того. Там можно будет комментировать самые горячие статьи твоего блога:

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates