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