You can use the lpc status or lpstat -t command to identify printers.
In most UNIX environments, you have more than one printer to choose from. You might want to send a print job to a certain printer because:
It’s closest to your desk
It’s a faster printer and you have a very large job
It doesn’t have other jobs already queued to it and you’re in a hurry
It has 1200 dpi resolution and you need a high-quality printout for reproduction
It has special fonts that you need in order to print
You can find out the names of printers by using the lpc status command on a BSD-based system, or the lpstat-t command on a System V—based system.
The lpc status command on a BSD-based system tells you what printers are available and whether they have any jobs on their queues (which is often all you care about, to find the printer with the shortest queue). For example:
% lpc status
emu:
queuing is enabled
printing is enabled
2 entries in spool area
emu is ready and printing
opal:
queuing is enabled
printing is enabled
5 entries in spool area
opal is ready and printing
rheas:
queuing is enabled
printing is enabled
no entries
no daemon present
...If you are looking for the shortest queue, you’ll want to send your job to rheas. opal has five jobs, and emu has two. (Although rheas says “no daemon present,” this doesn’t mean it isn’t functioning, just that it isn’t currently active.)
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access