1.\" Copyright (c) 1980, 1990 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" %sccs.include.redist.roff% 5.\" 6.\" @(#)lpr.1 6.9 (Berkeley) 05/09/91 7.\" 8.Dd 9.Dt LPR 1 10.Os BSD 4 11.Sh NAME 12.Nm lpr 13.Nd off line print 14.Sh SYNOPSIS 15.Nm lpr 16.Op Fl P Ns Ar printer 17.Op Fl \&# Ns Ar num 18.Op Fl C Ar class 19.Op Fl J Ar job 20.Op Fl T Ar title 21.Op Fl U Ar user 22.Op Fl i Op Ar numcols 23.Op Fl 1234 Ar font 24.Op Fl w Ns Ar num 25.Op Fl cdfghlnmprstv 26.Op Ar name ... 27.Sh DESCRIPTION 28.Nm Lpr 29uses a spooling daemon to print the named files when facilities 30become available. If no names appear, the standard input is assumed. 31.Pp 32The following single letter options are used to notify the line printer 33spooler that the files are not standard text files. The spooling daemon will 34use the appropriate filters to print the data accordingly. 35.Bl -tag -width indent 36.It Fl c 37The files are assumed to contain data produced by 38.Xr cifplot 1 39.It Fl d 40The files are assumed to contain data from 41.Em tex 42.Pf ( Tn DVI 43format from Stanford). 44.It Fl f 45Use a filter which interprets the first character of each line as a 46standard 47.Tn FORTRAN 48carriage control character. 49.It Fl g 50The files are assumed to contain standard plot data as produced by the 51.Xr plot 52routines (see also 53.Xr plot 54for the filters used by the printer spooler). 55.It Fl l 56Use a filter which allows control characters to be printed and suppresses 57page breaks. 58.It Fl n 59The files are assumed to contain data from 60.Em ditroff 61(device independent troff). 62.It Fl p 63Use 64.Xr pr 1 65to format the files (equivalent to 66.Xr print ) . 67.It Fl t 68The files are assumed to contain data from 69.Xr troff 1 70(cat phototypesetter commands). 71.It Fl v 72The files are assumed to contain a raster image for devices like the 73Benson Varian. 74.El 75.Pp 76These options apply to the handling of 77the print job: 78.Bl -tag -width indent 79.It Fl P 80Force output to a specific printer. Normally, 81the default printer is used (site dependent), or the value of the 82environment variable 83.Ev PRINTER 84is used. 85.It Fl h 86Suppress the printing of the burst page. 87.It Fl m 88Send mail upon completion. 89.It Fl r 90Remove the file upon completion of spooling or upon completion of 91printing (with the 92.Fl s 93option). 94.It Fl s 95Use symbolic links. Usually files are copied to the spool directory. 96The 97.Fl s 98option will use 99.Xr symlink 2 100to link data files rather than trying to copy them so large files can be 101printed. This means the files should 102not be modified or removed until they have been printed. 103.El 104.Pp 105The remaining options apply to copies, the page display, and headers: 106.Bl -tag -width indent 107.It Fl \&# Ns Ar num 108The quantity 109.Ar num 110is the number of copies desired of each file named. For example, 111.Bd -literal -offset indent 112lpr \-#3 foo.c bar.c more.c 113.Ed 114would result in 3 copies of the file foo.c, followed by 3 copies 115of the file bar.c, etc. On the other hand, 116.Bd -literal -offset indent 117cat foo.c bar.c more.c \&| lpr \-#3 118.Ed 119.Pp 120will give three copies of the concatenation of the files. Often 121a site will disable this feature to encourage use of a photocopier 122instead. 123.It Fl Oo Cm 1234 Oc Ar font 124Specifies a 125.Ar font 126to be mounted on font position 127.Ar i . 128The daemon 129will construct a 130.Li .railmag 131file referencing 132the font pathname. 133.It Fl C Ar class 134Job classification 135to use on the burst page. For example, 136.Bd -literal -offset indent 137lpr \-C EECS foo.c 138.Ed 139.Pp 140causes the system name (the name returned by 141.Xr hostname 1 ) 142to be replaced on the burst page by 143.Tn EECS , 144and the file foo.c to be printed. 145.It Fl J Ar job 146Job name to print on the burst page. 147Normally, the first file's name is used. 148.It Fl T Ar title 149Title name for 150.Xr pr 1 , 151instead of the file name. 152.It Fl U Ar user 153User name to print on the burst page, 154also for accounting purposes. 155This option is only honored if the real user-id is daemon 156(or that specified in the printcap file instead of daemon), 157and is intended for those instances where print filters wish to requeue jobs. 158.It Fl i Op numcols 159The output is indented. If the next argument 160is numeric 161.Pq Ar numcols , 162it is used as the number of blanks to be printed before each 163line; otherwise, 8 characters are printed. 164.It Fl w Ns Ar num 165Uses 166.Ar num 167as the page width for 168.Xr pr 1 . 169.El 170.Sh ENVIRONMENT 171If the following environment variable exists, it is used by 172.Nm lpr : 173.Bl -tag -width PRINTER 174.It Ev PRINTER 175Specifies an alternate default printer. 176.El 177.Sh FILES 178.Bl -tag -width /var/spool/output/*/tf* -compact 179.It Pa /etc/passwd 180Personal identification. 181.It Pa /etc/printcap 182Printer capabilities data base. 183.It Pa /usr/sbin/lpd* 184Line printer daemons. 185.It Pa /var/spool/output/* 186Directories used for spooling. 187.It Pa /var/spool/output/*/cf* 188Daemon control files. 189.It Pa /var/spool/output/*/df* 190Data files specified in "cf" files. 191.It Pa /var/spool/output/*/tf* 192Temporary copies of "cf" files. 193.El 194.Sh SEE ALSO 195.Xr lpq 1 , 196.Xr lprm 1 , 197.Xr pr 1 , 198.Xr symlink 2 , 199.Xr printcap 5 , 200.Xr lpc 8 , 201.Xr lpd 8 202.Sh HISTORY 203.Nm Lpr 204appeared in 205.Bx 3 . 206.Sh DIAGNOSTICS 207If you try to spool too large a file, it will be truncated. 208.Nm Lpr 209will object to printing binary files. 210If a user other than root prints a file and spooling is disabled, 211.Nm lpr 212will print a message saying so and will not put jobs in the queue. 213If a connection to 214.Xr lpd 1 215on the local machine cannot be made, 216.Nm lpr 217will say that the daemon cannot be started. 218Diagnostics may be printed in the daemon's log file 219regarding missing spool files by 220.Xr lpd 1 . 221.Sh BUGS 222Fonts for 223.Xr troff 1 224and 225.Xr tex 226reside on the host with the printer. It is currently not possible to 227use local font libraries. 228