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