Name

lpd

Synopsis

lpd [option] [port]

Description

TCP/IP command. Line printer daemon. lpd is usually invoked at boot time from the rc2 file. It makes a single pass through the printer configuration file (traditionally /etc/printcap) to find out about the existing printers and prints any files left after a crash. It then accepts requests to print files in a queue, transfer files to a spooling area, display a queue’s status, or remove jobs from a queue. In each case, it forks a child process for each request, then continues to listen for subsequent requests. If port is specified, lpd listens on that port; otherwise, it uses the getservbyname call to ascertain the correct port.

The file lock in each spool directory prevents multiple daemons from becoming active simultaneously. After the daemon has set the lock, it scans the directory for files beginning wth cf. Lines in each cf file specify files to be printed or nonprinting actions to be performed. Each line begins with a key character, which specifies information about the print job or what to do with the remainder of the line. Key characters are:

C

Classification—string to be used for the classification line on the burst page.

c

cifplot file.

f

Formatted file—name of a file to print that is already formatted.

g

Graph file.

H

Hostname—name of machine where lpd was invoked.

J

Job name—string to be used for the jobname on the burst page.

L

Literal—this line contains identification information from the password file and causes the banner ...

Get Linux in a Nutshell, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.