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