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.\" 3. 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: src/usr.sbin/lpr/lpr/lpr.1,v 1.11.2.6 2002/06/21 16:40:52 charnier Exp $ 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. If no names appear, the standard input is assumed. 57.Pp 58The following single letter options are used to notify the line printer 59spooler that the files are not standard text files. 60The spooling daemon will 61use the appropriate filters to print the data accordingly. 62Note that not all spoolers implement filters for all data types, 63and some sites may use these types for other purposes than the ones 64described here. 65.Bl -tag -width indent 66.It Fl d 67The files are assumed to contain data in 68.Tn DVI 69format from the 70.Tn TeX 71typesetting system. 72.It Fl f 73Use a filter which interprets the first character of each line as a 74standard 75.Tn FORTRAN 76carriage control character. 77.It Fl l 78Use a filter which allows control characters to be printed and suppresses 79page breaks. 80.It Fl p 81Use 82.Xr pr 1 83to format the files. 84.El 85.Pp 86The following options are historical and not directly supported by any 87software included in 88.Dx . 89.Bl -tag -width indent 90.It Fl c 91The files are assumed to contain data produced by 92.Xr cifplot 1 . 93.It Fl g 94The files are assumed to contain standard plot data as produced by the 95.Ux 96.Xr plot 3 97routines. 98.It Fl n 99The files are assumed to contain data from 100.Em ditroff 101(device independent troff). 102.It Fl t 103The files are assumed to contain 104.Tn C/A/T 105phototypesetter commands from ancient versions of 106.Ux 107.Xr troff 1 . 108.It Fl v 109The files are assumed to contain a raster image for devices like the 110Benson Varian. 111.El 112.Pp 113These options apply to the handling of 114the print job: 115.Bl -tag -width indent 116.It Fl P 117Force output to a specific printer. Normally, 118the default printer is used (site dependent), or the value of the 119environment variable 120.Ev PRINTER 121is used. 122.It Fl h 123Suppress the printing of the burst page. 124.It Fl m 125Send mail upon completion. 126.It Fl r 127Remove the file upon completion of spooling or upon completion of 128printing (with the 129.Fl s 130option). 131.It Fl s 132Use symbolic links. Usually files are copied to the spool directory. 133The 134.Fl s 135option will use 136.Xr symlink 2 137to link data files rather than trying to copy them so large files can be 138printed. This means the files should 139not be modified or removed until they have been printed. 140.El 141.Pp 142The remaining options apply to copies, the page display, and headers: 143.Bl -tag -width indent 144.It Fl \&# Ns Ar num 145The quantity 146.Ar num 147is the number of copies desired of each file named. For example, 148.Bd -literal -offset indent 149lpr \-#3 foo.c bar.c more.c 150.Ed 151would result in 3 copies of the file foo.c, followed by 3 copies 152of the file bar.c, etc. On the other hand, 153.Bd -literal -offset indent 154cat foo.c bar.c more.c \&| lpr \-#3 155.Ed 156.Pp 157will give three copies of the concatenation of the files. 158Often 159a site will disable this feature to encourage use of a photocopier 160instead. 161.It Xo 162.Fl Ns Op Cm 1234 163.Ar font 164.Xc 165Specifies a 166.Ar font 167to be mounted on font position 168.Ar i . 169The daemon 170will construct a 171.Li .railmag 172file referencing 173the font pathname. 174.It Fl C Ar class 175Job classification 176to use on the burst page. For example, 177.Bd -literal -offset indent 178lpr \-C EECS foo.c 179.Ed 180.Pp 181causes the system name (the name returned by 182.Xr hostname 1 ) 183to be replaced on the burst page by 184.Tn EECS , 185and the file foo.c to be printed. 186.It Fl J Ar job 187Job name to print on the burst page. 188Normally, the first file's name is used. 189.It Fl L Ar locale 190Use 191.Ar locale 192specified as argument instead of one found in environment. 193(Only effective when filtering through 194.Xr pr 1 195is requested using the 196.Fl p 197option.) 198.It Fl T Ar title 199Title name for 200.Xr pr 1 , 201instead of the file name. 202.It Fl U Ar user 203User name to print on the burst page, 204also for accounting purposes. 205This option is only honored if the real user-id is daemon 206(or that specified in the printcap file instead of daemon), 207and is intended for those instances where print filters wish to requeue jobs. 208.It Fl Z Ar daemon-options 209Some spoolers, such as 210.Tn LPRng , 211accept additional per-job options using a 212.Ql Z 213control line. 214When 215.Fl Z 216is specified, and 217.Fl p 218.Pq Xr pr 1 219is not requested, the specified 220.Ar daemon-options 221will be passed to the remote 222.Tn LPRng 223spooler. 224.It Fl i Ar numcols 225The output is indented by 226.Pq Ar numcols . 227.It Fl w Ar num 228Uses 229.Ar num 230as the page width for 231.Xr pr 1 . 232.El 233.Sh ENVIRONMENT 234If the following environment variable exists, it is used by 235.Nm : 236.Bl -tag -width PRINTER 237.It Ev PRINTER 238Specifies an alternate default printer. 239.El 240.Sh FILES 241.Bl -tag -width /var/spool/output/*/tf* -compact 242.It Pa /etc/passwd 243Personal identification. 244.It Pa /etc/printcap 245Printer capabilities data base. 246.It Pa /usr/sbin/lpd 247Line printer daemons. 248.It Pa /var/spool/output/* 249Directories used for spooling. 250.It Pa /var/spool/output/*/cf* 251Daemon control files. 252.It Pa /var/spool/output/*/df* 253Data files specified in "cf" files. 254.It Pa /var/spool/output/*/tf* 255Temporary copies of "cf" files. 256.El 257.Sh DIAGNOSTICS 258If you try to spool too large a file, it will be truncated. 259The 260.Nm 261utility will object to printing binary files. 262If a user other than root prints a file and spooling is disabled, 263.Nm 264will print a message saying so and will not put jobs in the queue. 265If a connection to 266.Xr lpd 8 267on the local machine cannot be made, 268.Nm 269will say that the daemon cannot be started. 270Diagnostics may be printed in the daemon's log file 271regarding missing spool files by 272.Xr lpd 8 . 273.Sh SEE ALSO 274.Xr lpq 1 , 275.Xr lprm 1 , 276.Xr pr 1 , 277.Xr symlink 2 , 278.Xr printcap 5 , 279.Xr lpc 8 , 280.Xr lpd 8 281.Sh HISTORY 282The 283.Nm 284command appeared in 285.Bx 3 . 286.Sh BUGS 287Fonts for 288.Xr troff 1 289and 290.Tn TeX 291reside on the host with the printer. 292It is currently not possible to 293use local font libraries. 294.Pp 295The 296.Ql Z 297control file line is used for two different purposes; for 298standard 299.Dx 300.Xr lpd 8 , 301it specifies a locale to be passed to 302.Xr pr 1 . 303For 304.Tn LPRng 305.Xr lpd 8 , 306it specifies additional options to be interpreted by the spooler's 307input and output filters. 308When submitting jobs via 309.Nm , 310.Fl p 311.Fl L Ar locale 312is used in the former context, and 313.Fl Z Ar daemon-options 314is used in the latter. 315