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