xref: /dragonfly/usr.sbin/lpr/lpr/lpr.1 (revision 279dd846)
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.\" $DragonFly: src/usr.sbin/lpr/lpr/lpr.1,v 1.4 2006/02/17 19:40:17 swildner Exp $
31.\" "
32.Dd June 6, 1993
33.Dt LPR 1
34.Os
35.Sh NAME
36.Nm lpr
37.Nd off line print
38.Sh SYNOPSIS
39.Nm
40.Op Fl P Ns Ar printer
41.Op Fl \&# Ns Ar num
42.Op Fl C Ar class
43.Op Fl J Ar job
44.Op Fl L Ar locale
45.Op Fl T Ar title
46.Op Fl U Ar user
47.Op Fl Z Ar daemon-options
48.Op Fl i Ar numcols
49.Op Fl 1234 Ar font
50.Op Fl w Ar num
51.Op Fl cdfghlnmprstv
52.Op Ar name ...
53.Sh DESCRIPTION
54The
55.Nm
56utility uses a spooling daemon to print the named files when facilities
57become available.  If 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.Dx .
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.  Normally,
119the default printer is used (site dependent), or the value of the
120environment variable
121.Ev PRINTER
122is used.
123.It Fl h
124Suppress the printing of the burst page.
125.It Fl m
126Send mail upon completion.
127.It Fl r
128Remove the file upon completion of spooling or upon completion of
129printing (with the
130.Fl s
131option).
132.It Fl s
133Use symbolic links.  Usually files are copied to the spool directory.
134The
135.Fl s
136option will use
137.Xr symlink  2
138to link data files rather than trying to copy them so large files can be
139printed.  This 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.  For example,
149.Bd -literal -offset indent
150lpr \-#3 foo.c bar.c more.c
151.Ed
152would result in 3 copies of the file foo.c, followed by 3 copies
153of the file bar.c, etc.  On the other hand,
154.Bd -literal -offset indent
155cat foo.c bar.c more.c \&| lpr \-#3
156.Ed
157.Pp
158will give three copies of the concatenation of the files.
159Often
160a site will disable this feature to encourage use of a photocopier
161instead.
162.It Xo
163.Fl Ns Op Cm 1234
164.Ar font
165.Xc
166Specifies a
167.Ar font
168to be mounted on font position
169.Ar i  .
170The daemon
171will construct a
172.Li .railmag
173file referencing
174the font pathname.
175.It Fl C Ar class
176Job classification
177to use on the burst page.  For example,
178.Bd -literal -offset indent
179lpr \-C EECS foo.c
180.Ed
181.Pp
182causes the system name (the name returned by
183.Xr hostname  1  )
184to be replaced on the burst page by
185.Tn EECS ,
186and the file foo.c to be printed.
187.It Fl J Ar job
188Job name to print on the burst page.
189Normally, the first file's name is used.
190.It Fl L Ar locale
191Use
192.Ar locale
193specified as argument instead of one found in environment.
194(Only effective when filtering through
195.Xr pr 1
196is requested using the
197.Fl p
198option.)
199.It Fl T Ar title
200Title name for
201.Xr pr 1 ,
202instead of the file name.
203.It Fl U Ar user
204User name to print on the burst page,
205also for accounting purposes.
206This option is only honored if the real user-id is daemon
207(or that specified in the printcap file instead of daemon),
208and is intended for those instances where print filters wish to requeue jobs.
209.It Fl Z Ar daemon-options
210Some spoolers, such as
211.Tn LPRng ,
212accept additional per-job options using a
213.Ql Z
214control line.
215When
216.Fl Z
217is specified, and
218.Fl p
219.Pq Xr pr 1
220is not requested, the specified
221.Ar daemon-options
222will be passed to the remote
223.Tn LPRng
224spooler.
225.It Fl i Ar numcols
226The output is indented by
227.Pq Ar numcols .
228.It Fl w Ar num
229Uses
230.Ar num
231as the page width for
232.Xr pr 1 .
233.El
234.Sh ENVIRONMENT
235If the following environment variable exists, it is used by
236.Nm :
237.Bl -tag -width PRINTER
238.It Ev PRINTER
239Specifies an alternate default printer.
240.El
241.Sh FILES
242.Bl -tag -width /var/spool/output/*/tf* -compact
243.It Pa /etc/passwd
244Personal identification.
245.It Pa /etc/printcap
246Printer capabilities data base.
247.It Pa /usr/sbin/lpd
248Line printer daemons.
249.It Pa /var/spool/output/*
250Directories used for spooling.
251.It Pa /var/spool/output/*/cf*
252Daemon control files.
253.It Pa /var/spool/output/*/df*
254Data files specified in "cf" files.
255.It Pa /var/spool/output/*/tf*
256Temporary copies of "cf" files.
257.El
258.Sh DIAGNOSTICS
259If you try to spool too large a file, it will be truncated.
260The
261.Nm
262utility will object to printing binary files.
263If a user other than root prints a file and spooling is disabled,
264.Nm
265will print a message saying so and will not put jobs in the queue.
266If a connection to
267.Xr lpd 8
268on the local machine cannot be made,
269.Nm
270will say that the daemon cannot be started.
271Diagnostics may be printed in the daemon's log file
272regarding missing spool files by
273.Xr lpd 8 .
274.Sh SEE ALSO
275.Xr lpq 1 ,
276.Xr lprm 1 ,
277.Xr pr 1 ,
278.Xr symlink 2 ,
279.Xr printcap 5 ,
280.Xr lpc 8 ,
281.Xr lpd 8
282.Sh HISTORY
283The
284.Nm
285command appeared in
286.Bx 3 .
287.Sh BUGS
288Fonts for
289.Xr troff 1
290and
291.Tn TeX
292reside on the host with the printer.
293It is currently not possible to
294use local font libraries.
295.Pp
296The
297.Ql Z
298control file line is used for two different purposes; for
299standard
300.Dx
301.Xr lpd 8 ,
302it specifies a locale to be passed to
303.Xr pr 1 .
304For
305.Tn LPRng
306.Xr lpd 8 ,
307it specifies additional options to be interpreted by the spooler's
308input and output filters.
309When submitting jobs via
310.Nm ,
311.Fl p
312.Fl L Ar locale
313is used in the former context, and
314.Fl Z Ar daemon-options
315is used in the latter.
316