Printer Information : lpstat

NAME
lpstat – print cups status information

DESCRIPTION
lpstat displays status information about the current classes, jobs, and printers. When run with no arguments, lpstat will list active jobs queued by the current user.

To find out what printers are installed
lpstat -p

List queue name of connected printer(s)
lpstat -p | grep printer | cut -d" " -f2

Display all printer information
lpstat -t

Display all device information
lpstat -v

Display all completed jobs
lpstat -W completed

Display all completed jobs by user
lpstat -W completed -u

Display all not-completed jobs by user
lpstat -W not-completed -u

Lists print queues installed
lpinfo -m

Clear print history and queue
lpstat -W not-completed -u

Clear print history and queue
sudo cancel -a -x

links:

Thanks: https://unix.stackexchange.com/questions/123634/how-to-show-the-cups-printer-jobs-history
Manage Printers via Command Line in OS X
https://www.computerhope.com/unix/ulpstat.htm

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *