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