Source Compatibility Guide

lpq

Returns information on all print jobs on the local printer; however, for remote printers, it provides the status only for jobs belonging to the user. lpq is the equivalent of the SunOS 5.x command lpstat.

The command lpq username provides the status of all files, on all machines (both local and remote), belonging to the named user. In these examples, user wesson sends files fileX and fileY to the local printer printerA, and fileZ to a remote printer:

$ lpr fileX
$ lpr fileY
$ lpq
Rank Owner Job Files
active smith printerA-111230 file1
1st wesson printerA-111231 fileX
2nd wesson printerA-111232 fileY
3rd jones printerA-111233 file9
$
$ lpr -Pfar_printer fileZ
$ lpq -Pfar_printer
Rank Owner Job Files
4th wesson far_printer-111332 fileZ
$
$ lpq wesson
printerA:
Rank Owner Job Files
1st wesson printerA-111231 FileX
2nd wesson printerA-111232 FileY
far_printer:
Rank Owner Job Files
4th wesson far_printer-111332 FileZ
$