Open file with Quick Look from command shell

5

2

Mac OS X has the very convenient open command to open any file from the command line in the same way that the Finder would.

thilo$ open a.pdf

Is there a similar command for opening the file with Quick Look?

Thilo

Posted 2010-01-09T04:38:42.537

Reputation: 2 975

Answers

10

qlmanage -p file will do what you want, I think.

Andrew McGregor

Posted 2010-01-09T04:38:42.537

Reputation: 1 022

2I have it aliased to qlmanage -p 2>/dev/null to suppress error messages. – Doug Harris – 2010-02-25T16:56:20.013

qlmanage -p /PATH/TO/FILE works like a charm. If you need more info check man qlmanage – Chealion – 2010-01-09T08:39:33.563

1Nice. I'll alias that to "ql". – Thilo – 2010-01-10T00:56:41.507