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