2.11BSD/man/cat8/lpd.0

Compare this file to the similar file:
Show the results in this format:




LPD(8)		    UNIX Programmer's Manual		   LPD(8)



NAME
     lpd - line printer daemon

SYNOPSIS
     /usr/sbin/lpd [ -l ] [ port # ]

DESCRIPTION
     _L_p_d is the line printer daemon (spool area handler)  and  is
     normally invoked at boot time from the _r_c(8) file.  It makes
     a single pass through the _p_r_i_n_t_c_a_p(5) file to find out about
     the  existing  printers  and  prints  any files left after a
     crash. It then uses the system calls _l_i_s_t_e_n(2) and _a_c_c_e_p_t(2)
     to  receive  requests  to print files in the queue, transfer
     files to the spooling area, display  the  queue,  or  remove
     jobs from the queue.  In each case, it forks a child to han-
     dle the request so the parent can	continue  to  listen  for
     more  requests.  The Internet port number used to rendezvous
     with  other  processes  is  normally  obtained   with   _g_e_t_-
     _s_e_r_v_b_y_n_a_m_e(3)  but  can  be changed with the _p_o_r_t# argument.
     The -l flag causes _l_p_d to log valid requests  received  from
     the network. This can be useful for debugging purposes.

     Access control is provided by two means. First, All requests
     must  come  from  one  of	the  machines  listed in the file
     /_e_t_c/_h_o_s_t_s._e_q_u_i_v or /_e_t_c/_h_o_s_t_s._l_p_d.  Second, if  the  ``rs''
     capability  is  specified	in  the  _p_r_i_n_t_c_a_p  entry  for the
     printer being accessed, _l_p_r requests will	only  be  honored
     for  those  users	with  accounts	on  the  machine with the
     printer.

     The file _m_i_n_f_r_e_e in each spool directory contains the number
     of  disk blocks to leave free so that the line printer queue
     won't completely fill the disk.  The  _m_i_n_f_r_e_e  file  can  be
     edited with your favorite text editor.

     The file _l_o_c_k in each spool directory  is	used  to  prevent
     multiple daemons from becoming active simultaneously, and to
     store information	about  the  daemon  process  for  _l_p_r(1),
     _l_p_q(1),  and _l_p_r_m(1).  After the daemon has successfully set
     the lock, it scans the directory for  files  beginning  with
     _c_f.   Lines  in  each _c_f file specify files to be printed or
     non-printing actions to be performed.  Each such line begins
     with  a  key  character  to  specify  what  to  do  with the
     remainder of the line.

     J	  Job Name.  String to be used for the job  name  on  the
	  burst page.

     C	  Classification.  String to be used for the  classifica-
	  tion line on the burst page.

     L	  Literal.  The line contains  identification  info  from



Printed 11/26/99	October 23, 1996			1






LPD(8)		    UNIX Programmer's Manual		   LPD(8)



	  the  password  file  and  causes  the banner page to be
	  printed.

     T	  Title.  String to be used as the title for _p_r(1).

     H	  Host Name.  Name of the machine where _l_p_r was invoked.

     P	  Person.  Login name of  the  person  who  invoked  _l_p_r.
	  This is used to verify ownership by _l_p_r_m.

     M	  Send mail to the specified user when the current  print
	  job completes.

     f	  Formatted File.  Name of  a  file  to  print	which  is
	  already formatted.

     l	  Like ``f'' but passes control characters and	does  not
	  make page breaks.

     p	  Name of a file to print using _p_r(1) as a filter.

     t	  Troff File.  The file  contains  _t_r_o_f_f(1)  output  (cat
	  phototypesetter commands).

     n	  Ditroff File.  The  file  contains  device  independent
	  troff output.

     d	  DVI File.  The file contains _T_e_x(l) output (DVI  format
	  from Standford).

     g	  Graph  File.	 The  file  contains  data  produced   by
	  _p_l_o_t(3X).

     c	  Cifplot File. The file contains data produced  by  _c_i_f_-
	  _p_l_o_t.

     v	  The file contains a raster image.

     r	  The file contains text data with FORTRAN carriage  con-
	  trol characters.

     1	  Troff Font R. Name of the font file to use  instead  of
	  the default.

     2	  Troff Font I. Name of the font file to use  instead  of
	  the default.

     3	  Troff Font B. Name of the font file to use  instead  of
	  the default.

     4	  Troff Font S. Name of the font file to use  instead  of
	  the default.



Printed 11/26/99	October 23, 1996			2






LPD(8)		    UNIX Programmer's Manual		   LPD(8)



     W	  Width. Changes the page width (in characters)  used  by
	  _p_r(1) and the text filters.

     I	  Indent.  The number of characters to indent the  output
	  by (in ascii).

     U	  Unlink.  Name of file  to  remove  upon  completion  of
	  printing.

     N	  File name.   The  name  of  the  file  which	is  being
	  printed, or a blank for the standard input (when _l_p_r is
	  invoked in a pipeline).

     If a file can not be opened, a message will  be  logged  via
     _s_y_s_l_o_g(3) using the _L_O_G__L_P_R facility.  _L_p_d will try up to 20
     times to reopen a file it expects to be there,  after  which
     it will skip the file to be printed.

     _L_p_d uses _f_l_o_c_k(2) to provide exclusive access  to	the  lock
     file  and	to  prevent multiple deamons from becoming active
     simultaneously.  If the daemon should be killed or die unex-
     pectedly,	the lock file need not be removed.  The lock file
     is kept in a readable ASCII form  and  contains  two  lines.
     The  first is the process id of the daemon and the second is
     the control file name of the current job being printed.  The
     second  line is updated to reflect the current status of _l_p_d
     for the programs _l_p_q(1) and _l_p_r_m(1).

FILES
     /etc/printcap	     printer description file
     /usr/spool/*	     spool directories
     /usr/spool/*/minfree    minimum free space to leave
     /dev/lp*		     line printer devices
     /dev/printer	     socket for local requests
     /etc/hosts.equiv	     lists machine names allowed printer access
     /etc/hosts.lpd	     lists machine names allowed printer access,
			     but not under same administrative control.

SEE ALSO
     lpc(8),  pac(1),	lpr(1),   lpq(1),   lprm(1),   syslog(3),
     printcap(5)
     _4._2_B_S_D _L_i_n_e _P_r_i_n_t_e_r _S_p_o_o_l_e_r _M_a_n_u_a_l













Printed 11/26/99	October 23, 1996			3