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