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