Linux Commands Examples

A great documentation place for Linux commands


show printer queue status

see also : cancel - lp - lpr - lprm - lpstat


lpq [ -E ] [ -U username ] [ -h server[:port] ] [ -P destination[/instance] ] [ -a ] [ -l ] [ +interval ]

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!


tmp1=`lpq -Ppsts | wc -l`
tmp2=`lpq -Ppsts-sx | wc -l`
tmp3=`lpq -Ppsts-dx | wc -l`
tmp1=`lpq -Ppstsb | wc -l`
tmp2=`lpq -Ppstsb-sx | wc -l`
tmp3=`lpq -Ppstsb-dx | wc -l`


lpq shows the current print queue status on the named printer. Jobs queued on the default destination will be shown if no printer or class is specified on the command-line.

The +interval option allows you to continuously report the jobs in the queue until the queue is empty; the list of jobs is shown once every interval seconds.


lpq supports the following options:


Forces encryption when connecting to the server.

-P destination[/instance]

Specifies an alternate printer or class name.

-U username

Specifies an alternate username.


Reports jobs on all printers.

-h server[:port]

Specifies an alternate server.


Requests a more verbose (long) reporting format.


Copyright 2007-2013 by Apple Inc.

see also

cancel , lp , lpr , lprm , lpstat ,

How can this site be more helpful to YOU ?

give  feedback