xref: /386bsd/usr/src/usr.sbin/lpr/lpr/lpr.1 (revision a2142627)
1.\" Copyright (c) 1980, 1990 The Regents of the University of California.
2.\" 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.\"     @(#)lpr.1	6.10 (Berkeley) 7/24/91
33.\"
34.Dd July 24, 1991
35.Dt LPR 1
36.Os BSD 4
37.Sh NAME
38.Nm lpr
39.Nd off line print
40.Sh SYNOPSIS
41.Nm lpr
42.Op Fl P Ns Ar printer
43.Op Fl \&# Ns Ar num
44.Op Fl C Ar class
45.Op Fl J Ar job
46.Op Fl T Ar title
47.Op Fl U Ar user
48.Op Fl i Op Ar numcols
49.Op Fl 1234 Ar font
50.Op Fl w Ns Ar num
51.Op Fl cdfghlnmprstv
52.Op Ar name ...
53.Sh DESCRIPTION
54.Nm Lpr
55uses a spooling daemon to print the named files when facilities
56become available.  If no names appear, the standard input is assumed.
57.Pp
58The following single letter options are used to notify the line printer
59spooler that the files are not standard text files. The spooling daemon will
60use the appropriate filters to print the data accordingly.
61.Bl -tag -width indent
62.It Fl c
63The files are assumed to contain data produced by
64.Xr cifplot 1
65.It Fl d
66The files are assumed to contain data from
67.Em tex
68.Pf ( Tn DVI
69format from Stanford).
70.It Fl f
71Use a filter which interprets the first character of each line as a
72standard
73.Tn FORTRAN
74carriage control character.
75.It Fl g
76The files are assumed to contain standard plot data as produced by the
77.Xr plot
78routines (see also
79.Xr plot
80for the filters used by the printer spooler).
81.It Fl l
82Use a filter which allows control characters to be printed and suppresses
83page breaks.
84.It Fl n
85The files are assumed to contain data from
86.Em ditroff
87(device independent troff).
88.It Fl p
89Use
90.Xr pr  1
91to format the files (equivalent to
92.Xr print  ) .
93.It Fl t
94The files are assumed to contain data from
95.Xr troff  1
96(cat phototypesetter commands).
97.It Fl v
98The files are assumed to contain a raster image for devices like the
99Benson Varian.
100.El
101.Pp
102These options apply to the handling of
103the print job:
104.Bl -tag -width indent
105.It Fl P
106Force output to a specific printer.  Normally,
107the default printer is used (site dependent), or the value of the
108environment variable
109.Ev PRINTER
110is used.
111.It Fl h
112Suppress the printing of the burst page.
113.It Fl m
114Send mail upon completion.
115.It Fl r
116Remove the file upon completion of spooling or upon completion of
117printing (with the
118.Fl s
119option).
120.It Fl s
121Use symbolic links.  Usually files are copied to the spool directory.
122The
123.Fl s
124option will use
125.Xr symlink  2
126to link data files rather than trying to copy them so large files can be
127printed.  This means the files should
128not be modified or removed until they have been printed.
129.El
130.Pp
131The remaining options apply to copies, the page display, and headers:
132.Bl -tag -width indent
133.It Fl \&# Ns Ar num
134The quantity
135.Ar num
136is the number of copies desired of each file named.  For example,
137.Bd -literal -offset indent
138lpr \-#3 foo.c bar.c more.c
139.Ed
140would result in 3 copies of the file foo.c, followed by 3 copies
141of the file bar.c, etc.  On the other hand,
142.Bd -literal -offset indent
143cat foo.c bar.c more.c \&| lpr \-#3
144.Ed
145.Pp
146will give three copies of the concatenation of the files. Often
147a site will disable this feature to encourage use of a photocopier
148instead.
149.It Xo
150.Fl Ns Oo Cm 1234 Oc Ar font
151.Xc
152Specifies a
153.Ar font
154to be mounted on font position
155.Ar i  .
156The daemon
157will construct a
158.Li .railmag
159file referencing
160the font pathname.
161.It Fl C Ar class
162Job classification
163to use on the burst page.  For example,
164.Bd -literal -offset indent
165lpr \-C EECS foo.c
166.Ed
167.Pp
168causes the system name (the name returned by
169.Xr hostname  1  )
170to be replaced on the burst page by
171.Tn EECS ,
172and the file foo.c to be printed.
173.It Fl J Ar job
174Job name to print on the burst page.
175Normally, the first file's name is used.
176.It Fl T Ar title
177Title name for
178.Xr pr  1 ,
179instead of the file name.
180.It Fl U Ar user
181User name to print on the burst page,
182also for accounting purposes.
183This option is only honored if the real user-id is daemon
184(or that specified in the printcap file instead of daemon),
185and is intended for those instances where print filters wish to requeue jobs.
186.It Fl i Op numcols
187The output is indented. If the next argument
188is numeric
189.Pq Ar numcols ,
190it is used as the number of blanks to be printed before each
191line; otherwise, 8 characters are printed.
192.It Fl w Ns Ar num
193Uses
194.Ar num
195as the page width for
196.Xr pr 1 .
197.El
198.Sh ENVIRONMENT
199If the following environment variable exists, it is used by
200.Nm lpr :
201.Bl -tag -width PRINTER
202.It Ev PRINTER
203Specifies an alternate default printer.
204.El
205.Sh FILES
206.Bl -tag -width /var/spool/output/*/tf* -compact
207.It Pa /etc/passwd
208Personal identification.
209.It Pa /etc/printcap
210Printer capabilities data base.
211.It Pa /usr/sbin/lpd*
212Line printer daemons.
213.It Pa /var/spool/output/*
214Directories used for spooling.
215.It Pa /var/spool/output/*/cf*
216Daemon control files.
217.It Pa /var/spool/output/*/df*
218Data files specified in "cf" files.
219.It Pa /var/spool/output/*/tf*
220Temporary copies of "cf" files.
221.El
222.Sh SEE ALSO
223.Xr lpq 1 ,
224.Xr lprm 1 ,
225.Xr pr 1 ,
226.Xr symlink 2 ,
227.Xr printcap 5 ,
228.Xr lpc 8 ,
229.Xr lpd 8
230.Sh HISTORY
231The
232.Nm lpr
233command appeared in
234.Bx 3 .
235.Sh DIAGNOSTICS
236If you try to spool too large a file, it will be truncated.
237.Nm Lpr
238will object to printing binary files.
239If a user other than root prints a file and spooling is disabled,
240.Nm lpr
241will print a message saying so and will not put jobs in the queue.
242If a connection to
243.Xr lpd 1
244on the local machine cannot be made,
245.Nm lpr
246will say that the daemon cannot be started.
247Diagnostics may be printed in the daemon's log file
248regarding missing spool files by
249.Xr lpd 1 .
250.Sh BUGS
251Fonts for
252.Xr troff 1
253and
254.Xr tex
255reside on the host with the printer. It is currently not possible to
256use local font libraries.
257