1.\" Copyright (c) 1980, 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 4. Neither the name of the University nor the names of its contributors 13.\" may be used to endorse or promote products derived from this software 14.\" without specific prior written permission. 15.\" 16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26.\" SUCH DAMAGE. 27.\" 28.\" From @(#)lpr.1 8.1 (Berkeley) 6/6/93 29.\" $FreeBSD$ 30.\" " 31.Dd June 6, 1993 32.Dt LPR 1 33.Os 34.Sh NAME 35.Nm lpr 36.Nd off line print 37.Sh SYNOPSIS 38.Nm 39.Op Fl P Ns Ar printer 40.Op Fl \&# Ns Ar num 41.Op Fl C Ar class 42.Op Fl J Ar job 43.Op Fl L Ar locale 44.Op Fl T Ar title 45.Op Fl U Ar user 46.Op Fl Z Ar daemon-options 47.Op Fl i Ar numcols 48.Op Fl 1234 Ar font 49.Op Fl w Ar num 50.Op Fl cdfghlnmprstv 51.Op Ar name ... 52.Sh DESCRIPTION 53The 54.Nm 55utility uses a spooling daemon to print the named files when facilities 56become available. 57If no names appear, the standard input is assumed. 58.Pp 59The following single letter options are used to notify the line printer 60spooler that the files are not standard text files. 61The spooling daemon will 62use the appropriate filters to print the data accordingly. 63Note that not all spoolers implement filters for all data types, 64and some sites may use these types for other purposes than the ones 65described here. 66.Bl -tag -width indent 67.It Fl d 68The files are assumed to contain data in 69.Tn DVI 70format from the 71.Tn TeX 72typesetting system. 73.It Fl f 74Use a filter which interprets the first character of each line as a 75standard 76.Tn FORTRAN 77carriage control character. 78.It Fl l 79Use a filter which allows control characters to be printed and suppresses 80page breaks. 81.It Fl p 82Use 83.Xr pr 1 84to format the files. 85.El 86.Pp 87The following options are historical and not directly supported by any 88software included in 89.Fx . 90.Bl -tag -width indent 91.It Fl c 92The files are assumed to contain data produced by 93.Xr cifplot 1 . 94.It Fl g 95The files are assumed to contain standard plot data as produced by the 96.Ux 97.Xr plot 3 98routines. 99.It Fl n 100The files are assumed to contain data from 101.Em ditroff 102(device independent troff). 103.It Fl t 104The files are assumed to contain 105.Tn C/A/T 106phototypesetter commands from ancient versions of 107.Ux 108.Xr troff 1 . 109.It Fl v 110The files are assumed to contain a raster image for devices like the 111Benson Varian. 112.El 113.Pp 114These options apply to the handling of 115the print job: 116.Bl -tag -width indent 117.It Fl P 118Force output to a specific printer. 119Normally, 120the default printer is used (site dependent), or the value of the 121environment variable 122.Ev PRINTER 123is used. 124.It Fl h 125Suppress the printing of the burst page. 126.It Fl m 127Send mail upon completion. 128.It Fl r 129Remove the file upon completion of spooling or upon completion of 130printing (with the 131.Fl s 132option). 133.It Fl s 134Use symbolic links. 135Usually files are copied to the spool directory. 136The 137.Fl s 138option will use 139.Xr symlink 2 140to link data files rather than trying to copy them so large files can be 141printed. 142This means the files should 143not be modified or removed until they have been printed. 144.El 145.Pp 146The remaining options apply to copies, the page display, and headers: 147.Bl -tag -width indent 148.It Fl \&# Ns Ar num 149The quantity 150.Ar num 151is the number of copies desired of each file named. 152For example, 153.Bd -literal -offset indent 154lpr \-#3 foo.c bar.c more.c 155.Ed 156would result in 3 copies of the file foo.c, followed by 3 copies 157of the file bar.c, etc. 158On the other hand, 159.Bd -literal -offset indent 160cat foo.c bar.c more.c \&| lpr \-#3 161.Ed 162.Pp 163will give three copies of the concatenation of the files. 164Often 165a site will disable this feature to encourage use of a photocopier 166instead. 167.It Xo 168.Fl Ns Op Cm 1234 169.Ar font 170.Xc 171Specifies a 172.Ar font 173to be mounted on font position 174.Ar i . 175The daemon 176will construct a 177.Li .railmag 178file referencing 179the font pathname. 180.It Fl C Ar class 181Job classification 182to use on the burst page. 183For example, 184.Bd -literal -offset indent 185lpr \-C EECS foo.c 186.Ed 187.Pp 188causes the system name (the name returned by 189.Xr hostname 1 ) 190to be replaced on the burst page by 191.Tn EECS , 192and the file foo.c to be printed. 193.It Fl J Ar job 194Job name to print on the burst page. 195Normally, the first file's name is used. 196.It Fl L Ar locale 197Use 198.Ar locale 199specified as argument instead of one found in environment. 200(Only effective when filtering through 201.Xr pr 1 202is requested using the 203.Fl p 204option.) 205.It Fl T Ar title 206Title name for 207.Xr pr 1 , 208instead of the file name. 209.It Fl U Ar user 210User name to print on the burst page, 211also for accounting purposes. 212This option is only honored if the real user-id is daemon 213(or that specified in the printcap file instead of daemon), 214and is intended for those instances where print filters wish to requeue jobs. 215.It Fl Z Ar daemon-options 216Some spoolers, such as 217.Tn LPRng , 218accept additional per-job options using a 219.Ql Z 220control line. 221When 222.Fl Z 223is specified, and 224.Fl p 225.Pq Xr pr 1 226is not requested, the specified 227.Ar daemon-options 228will be passed to the remote 229.Tn LPRng 230spooler. 231.It Fl i Ar numcols 232The output is indented by 233.Pq Ar numcols . 234.It Fl w Ar num 235Uses 236.Ar num 237as the page width for 238.Xr pr 1 . 239.El 240.Sh ENVIRONMENT 241If the following environment variable exists, it is used by 242.Nm : 243.Bl -tag -width PRINTER 244.It Ev PRINTER 245Specifies an alternate default printer. 246.El 247.Sh FILES 248.Bl -tag -width /var/spool/output/*/tf* -compact 249.It Pa /etc/passwd 250Personal identification. 251.It Pa /etc/printcap 252Printer capabilities data base. 253.It Pa /usr/sbin/lpd 254Line printer daemons. 255.It Pa /var/spool/output/* 256Directories used for spooling. 257.It Pa /var/spool/output/*/cf* 258Daemon control files. 259.It Pa /var/spool/output/*/df* 260Data files specified in "cf" files. 261.It Pa /var/spool/output/*/tf* 262Temporary copies of "cf" files. 263.El 264.Sh DIAGNOSTICS 265If you try to spool too large a file, it will be truncated. 266The 267.Nm 268utility will object to printing binary files. 269If a user other than root prints a file and spooling is disabled, 270.Nm 271will print a message saying so and will not put jobs in the queue. 272If a connection to 273.Xr lpd 8 274on the local machine cannot be made, 275.Nm 276will say that the daemon cannot be started. 277Diagnostics may be printed in the daemon's log file 278regarding missing spool files by 279.Xr lpd 8 . 280.Sh SEE ALSO 281.Xr lpq 1 , 282.Xr lprm 1 , 283.Xr pr 1 , 284.Xr symlink 2 , 285.Xr printcap 5 , 286.Xr lpc 8 , 287.Xr lpd 8 288.Sh HISTORY 289The 290.Nm 291command appeared in 292.Bx 3 . 293.Sh BUGS 294Fonts for 295.Xr troff 1 296and 297.Tn TeX 298reside on the host with the printer. 299It is currently not possible to 300use local font libraries. 301.Pp 302The 303.Ql Z 304control file line is used for two different purposes; for 305standard 306.Fx 307.Xr lpd 8 , 308it specifies a locale to be passed to 309.Xr pr 1 . 310For 311.Tn LPRng 312.Xr lpd 8 , 313it specifies additional options to be interpreted by the spooler's 314input and output filters. 315When submitting jobs via 316.Nm , 317.Fl p 318.Fl L Ar locale 319is used in the former context, and 320.Fl Z Ar daemon-options 321is used in the latter. 322