1lpr(1B) SunOS/BSD Compatibility Package Commands lpr(1B)
2
3
4
6 lpr - submit print requests
7
9 /usr/ucb/lpr [-P destination] [-# number] [-C class]
10 [-J job] [-T title] [-i [indent]]
11 [-1 | -2 | -3 | -4 font] [-w cols] [-m] [-h] [-s]
12 [-filter_option] [file]...
13
14
16 The lpr utility submits print requests to a destination. lpr prints
17 files (file) and associated information, collectively called a print
18 request. If file is not specified, lpr assumes the standard input.
19
20
21 The print client commands locate destination information using the
22 "printers" database in the name service switch. See nsswitch.conf(4),
23 printers(4), and printers.conf(4) for details.
24
25
26 Print requests with more than 52 files specified is truncated to 52
27 files when the BSD print protocol is used for job submission.
28
30 The following options are supported:
31
32 -C class
33
34 Prints class as the job classification on the banner page of the
35 output. Enclose class in double quotes if it contains blanks. If
36 class is not specified, the name of the system (as returned by
37 hostname) is printed as the job classification. See hostname(1).
38
39
40 -h
41
42 Suppresses printing of the banner page of the output.
43
44
45 -i indent
46
47 Indents the output a specific number of SPACE characters. Use
48 indent to indicate the number of SPACE characters to be indented.
49 Specify indent as a positive integer. If the optional argument to
50 indent is not specified, then eight SPACE characters is the
51 default. The -i option is ignored unless it is specified with the
52 -p filter option.
53
54
55 -J job
56
57 Prints job as the job name on the banner page of the output.
58 Enclose job in double quotes if it contains blanks. If job is not
59 specified, file (or in the case of multiple files, the first file
60 specified on the command line) is printed as the job name on the
61 banner page of the output.
62
63
64 -m
65
66 Sends mail after file has printed. See mail(1). By default, no mail
67 is sent upon normal completion of a print request.
68
69
70 -P destination
71
72 Prints file on a specific printer or class of printers (see lpad‐
73 min(1M)). Specify destination using atomic, URI-style
74 (scheme://endpoint), or POSIX-style (server:destination) names. See
75 printers.conf(4) for information regarding destination names.
76
77
78 -s
79
80 Prints files by reference rather than copying them. This means that
81 files should not be modified or removed until they have completed
82 printing. This option only prevents copying of files when the print
83 queue is on the local machine and the files are specified on the
84 command line.
85
86
87 -T title
88
89 Prints a title on the page header of the output. Enclose title in
90 double quotes if it contains blanks. The -T option is ignored
91 unless it is specified with the -p filter option.
92
93
94 -w cols
95
96 Prints file with pages of a specific width. cols indicates the num‐
97 ber of columns wide. The -w option is ignored unless it is speci‐
98 fied with the -p filter option.
99
100
101 −1|−2|−3|−4 font
102
103 Mounts the specified font in the font position 1, 2, 3, or 4. Spec‐
104 ify font as a valid font name.
105
106
107 − filter_option
108
109 Notifies the print spooler that file is not a standard text file.
110 Enables the spooling daemon to use the appropriate filters to print
111 file.
112
113 filter_options offer a standard user interface. All filter options
114 might not be available for, or applicable to, all printers.
115
116 Specify filter_option as a single character.
117
118 If filter_option is not specified and the printer can interpret
119 PostScript®, inserting `%!' as the first two characters of file
120 causes file to be interpreted as PostScript.
121
122 The following filter options are supported:
123
124 c file contains data produced by cifplot.
125
126
127 d file contains tex data in DVI format from Stanford.
128
129
130 f Interprets the first character of each line as a standard FOR‐
131 TRAN carriage control character.
132
133
134 g file contains standard plot data produced by plot(1B) rou‐
135 tines.
136
137
138 l Print control characters and suppress page breaks.
139
140
141 n file contains ditroff data from device independent troff.
142
143
144 p Use pr to format the files. See pr(1).
145
146
147 t file contains troff (cat phototypesetter) binary data.
148
149
150 v file contains a raster image. printer must support an appro‐
151 priate imaging model such as PostScript in order to print the
152 image.
153
154
155
156 -# number
157
158 Prints a specific number of copies. Specify number as a positive
159 integer. The default for number is 1.
160
161
163 The following operand is supported:
164
165 file The name of the file to be printed. Specify file as a pathname.
166 If file is not specified, lpr uses the standard input.
167
168
170 See largefile(5) for the description of the behavior of lpr when
171 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
172
174 The following exit values are returned:
175
176 0 Successful completion.
177
178
179 non-zero An error occurred.
180
181
183 /etc/printers.conf System printer configuration database
184
185
186 $HOME/.printers User-configurable printer database
187
188
189 ou=printers LDAP version of /etc/printers.conf
190
191
192 printers.conf.byname NIS version of /etc/printers.conf
193
194
195 printers.org_dir NIS+ version of /etc/printers.conf
196
197
199 See attributes(5) for descriptions of the following attributes:
200
201
202
203
204 ┌─────────────────────────────┬─────────────────────────────┐
205 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
206 ├─────────────────────────────┼─────────────────────────────┤
207 │Availability │SUNWlpr_cmds │
208 ├─────────────────────────────┼─────────────────────────────┤
209 │Interface Stabilitly │Standard │
210 ├─────────────────────────────┼─────────────────────────────┤
211 │CSI │Enabled. See NOTES │
212 └─────────────────────────────┴─────────────────────────────┘
213
215 hostname(1), lp(1), lpc(1B), lpq(1B), lprm(1B), lpstat(1), mail(1),
216 plot(1B), pr(1), troff(1), lpadmin(1M), nsswitch.conf(4), printers(4),
217 printers.conf(4), attributes(5), largefile(5), standards(5)
218
220 lpr: destination |: unknown destination
221
222 destination was not found in the LP configuration database. Usually
223 this is a typing mistake; however, it can indicate that the desti‐
224 nation does not exist on the system. Use lpstat -p to display
225 information about the status of the print service.
226
227
229 lpr is CSI-enabled except for the printer name.
230
231
232 Print jobs are assumed to contain one type of data. That type of data
233 is either specified on the command line or autodetected (simple, Post‐
234 Script) based on the contents of the first file in the job.
235
236
237 When IPP is in use, the user is prompted for a passphrase if the remote
238 print service is configured to require authentication.
239
240
241
242SunOS 5.11 2 Jun 2006 lpr(1B)