Linux Commands Examples

A great documentation place for Linux commands

lpq

show printer queue status


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

Synopsis

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!

examples

0
source
            
tmp1=`lpq -Ppsts | wc -l`
tmp2=`lpq -Ppsts-sx | wc -l`
tmp3=`lpq -Ppsts-dx | wc -l`
p1=$(($tmp1+$tmp2+$tmp3))
tmp1=`lpq -Ppstsb | wc -l`
tmp2=`lpq -Ppstsb-sx | wc -l`
tmp3=`lpq -Ppstsb-dx | wc -l`
p2=$(($tmp1+$tmp2+$tmp3))

description

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.

options

lpq supports the following options:

-E

Forces encryption when connecting to the server.

-P destination[/instance]

Specifies an alternate printer or class name.

-U username

Specifies an alternate username.

-a

Reports jobs on all printers.

-h server[:port]

Specifies an alternate server.

-l

Requests a more verbose (long) reporting format.

copyright

Copyright 2007-2013 by Apple Inc.


see also

cancel , lp , lpr , lprm , lpstat ,
http://localhost:631/help

How can this site be more helpful to YOU ?


give  feedback