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