Looking for Printer names

Jeffrey M White jeff at eniac.seas.upenn.edu
Fri Sep 8 00:36:27 AEST 1989


In article <3979 at phri.UUCP> roy at phri.UUCP (Roy Smith) writes:
>In <2024 at munnari.oz.au> kklw at mullian..ee.mu.OZ.AU (Kevin K L WONG) writes:
>> 	How can I find out what are the names of printers availble in an
>> unix system for the command lpr ? Thank you.
>
>	Assuming you are running a fairly standard Berkeley system, you
>should be able to just look at the /etc/printcap file.  It should have a
>number of entries which look sort of like the following.  The first bit,
>the "lp9|cit902" gives the name(s) for this printer.
>...

  Unless the program is restricted, you can also use the lpc command (usually
located in /etc) to get all the printer names.  Just say "lpc stat all".  It's
output will look like the following:

% cets:
	queuing is enabled
	printing is enabled
	no entries
	no daemon present
pender:
	queuing is enabled
	printing is enabled
	no entries
	no daemon present
lw:
	queuing is enabled
	printing is enabled
	no entries
	no daemon present

where "cets", "pender", and "lw" are the names of the printers.

						Jeff White
						University of Pennsylvania
						jeff at eniac.seas.upenn.edu



More information about the Comp.unix.wizards mailing list