]>
Commit | Line | Data |
---|---|---|
cc7359ae | 1 | <!DOCTYPE html> |
94436c5a | 2 | <html> |
cc7359ae | 3 | <head> |
4e3aaa5e | 4 | <meta name="creator" content="mantohtml v2.0.2"> |
cc7359ae MS |
5 | <title>lp(1)</title> |
6 | </head> | |
7 | <body> | |
8 | <h1 id="lp-1">lp(1)</h1> | |
9 | <h2 id="lp-1.name">Name</h2> | |
10 | <p>lp - print files | |
11 | </p> | |
12 | <h2 id="lp-1.synopsis">Synopsis</h2> | |
13 | <p><strong>lp</strong> | |
cfa19b58 | 14 | [ |
cc7359ae | 15 | <strong>-h </strong><em>hostname</em>[<strong>:</strong><em>port</em>] |
4d6787bd | 16 | ] [ |
cc7359ae | 17 | <strong>-E</strong> |
cfa19b58 | 18 | ] [ |
cc7359ae MS |
19 | <strong>-U</strong> |
20 | <em>username</em> | |
cfa19b58 | 21 | ] [ |
cc7359ae | 22 | <strong>-c</strong> |
cfa19b58 | 23 | ] [ |
cc7359ae | 24 | <strong>-d </strong><em>destination</em>[<strong>/</strong><em>instance</em>] |
cfa19b58 | 25 | ] [ |
cc7359ae | 26 | <strong>-m</strong> |
cfa19b58 | 27 | ] [ |
cc7359ae MS |
28 | <strong>-n</strong> |
29 | <em>num-copies</em> | |
cfa19b58 | 30 | ] [ |
cc7359ae | 31 | <strong>-o </strong><em>option</em>[<strong>=</strong><em>value</em>] |
cfa19b58 | 32 | ] [ |
cc7359ae MS |
33 | <strong>-q</strong> |
34 | <em>priority</em> | |
cfa19b58 | 35 | ] [ |
cc7359ae | 36 | <strong>-s</strong> |
cfa19b58 | 37 | ] [ |
cc7359ae MS |
38 | <strong>-t</strong> |
39 | <em>title</em> | |
cfa19b58 | 40 | ] [ |
cc7359ae MS |
41 | <strong>-H</strong> |
42 | <em>handling</em> | |
cfa19b58 | 43 | ] [ |
cc7359ae MS |
44 | <strong>-P</strong> |
45 | <em>page-list</em> | |
cfa19b58 | 46 | ] [ |
cc7359ae | 47 | <strong>--</strong> |
cfa19b58 | 48 | ] [ |
cc7359ae | 49 | <em>file(s)</em> |
c277f98c MS |
50 | ] |
51 | <br> | |
cc7359ae | 52 | <strong>lp</strong> |
cfa19b58 | 53 | [ |
cc7359ae | 54 | <strong>-h </strong><em>hostname</em>[<strong>:</strong><em>port</em>] |
4d6787bd | 55 | ] [ |
cc7359ae | 56 | <strong>-E</strong> |
cfa19b58 | 57 | ] [ |
cc7359ae MS |
58 | <strong>-U</strong> |
59 | <em>username</em> | |
cfa19b58 | 60 | ] [ |
cc7359ae | 61 | <strong>-c</strong> |
cfa19b58 | 62 | ] [ |
cc7359ae MS |
63 | <strong>-i</strong> |
64 | <em>job-id</em> | |
cfa19b58 | 65 | ] [ |
cc7359ae MS |
66 | <strong>-n</strong> |
67 | <em>num-copies</em> | |
cfa19b58 | 68 | ] [ |
cc7359ae | 69 | <strong>-o </strong><em>option</em>[<strong>=</strong><em>value</em>] |
cfa19b58 | 70 | ] [ |
cc7359ae MS |
71 | <strong>-q</strong> |
72 | <em>priority</em> | |
cfa19b58 | 73 | ] [ |
cc7359ae MS |
74 | <strong>-t</strong> |
75 | <em>title</em> | |
cfa19b58 | 76 | ] [ |
cc7359ae MS |
77 | <strong>-H</strong> |
78 | <em>handling</em> | |
cfa19b58 | 79 | ] [ |
cc7359ae MS |
80 | <strong>-P</strong> |
81 | <em>page-list</em> | |
c277f98c | 82 | ] |
cc7359ae MS |
83 | </p> |
84 | <h2 id="lp-1.description">Description</h2> | |
85 | <p><strong>lp</strong> submits files for printing or alters a pending job. | |
86 | Use a filename of "-" to force printing from the standard input. | |
87 | </p> | |
88 | <h3 id="lp-1.description.the-default-destination">The Default Destination</h3> | |
89 | <p>CUPS provides many ways to set the default destination. The <strong>LPDEST</strong> and <strong>PRINTER</strong> environment variables are consulted first. | |
cfa19b58 | 90 | If neither are set, the current default set using the |
4e3aaa5e | 91 | <a href="lpoptions.html"><strong>lpoptions</strong>(1)</a> |
cc7359ae | 92 | |
cfa19b58 | 93 | command is used, followed by the default set using the |
4e3aaa5e | 94 | <a href="lpadmin.html"><strong>lpadmin</strong>(8)</a> |
cc7359ae | 95 | |
cfa19b58 | 96 | command. |
cc7359ae MS |
97 | </p> |
98 | <h2 id="lp-1.options">Options</h2> | |
99 | <p>The following options are recognized by <em>lp</em>: | |
100 | </p> | |
101 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--</strong><br> | |
102 | Marks the end of options; use this to print a file whose name begins with a dash (-). | |
103 | </p> | |
104 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-E</strong><br> | |
105 | Forces encryption when connecting to the server. | |
106 | </p> | |
107 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-U </strong><em>username</em><br> | |
108 | Specifies the username to use when connecting to the server. | |
109 | </p> | |
110 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-c</strong><br> | |
111 | This option is provided for backwards-compatibility only. On systems that support it, this option forces the print file to be copied to the spool directory before printing. | |
cfa19b58 | 112 | In CUPS, print files are always sent to the scheduler via IPP which has the same effect. |
cc7359ae MS |
113 | </p> |
114 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-d </strong><em>destination</em><br> | |
115 | Prints files to the named printer. | |
116 | </p> | |
117 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-h </strong><em>hostname</em>[<strong>:</strong><em>port</em>]<br> | |
118 | Chooses an alternate server. | |
4d6787bd | 119 | Note: This option must occur before all others. |
cc7359ae MS |
120 | </p> |
121 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-i </strong><em>job-id</em><br> | |
122 | Specifies an existing job to modify. | |
123 | </p> | |
124 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-m</strong><br> | |
125 | Sends an email when the job is completed. | |
126 | </p> | |
127 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-n </strong><em>copies</em><br> | |
128 | Sets the number of copies to print. | |
129 | </p> | |
130 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-o "</strong><em>name</em><strong>=</strong><em>value </em>[ ... <em>name</em><strong>=</strong><em>value </em>]<strong>"</strong><br> | |
131 | Sets one or more job options. | |
132 | See "COMMON JOB OPTIONS" below. | |
133 | </p> | |
134 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-q </strong><em>priority</em><br> | |
135 | Sets the job priority from 1 (lowest) to 100 (highest). | |
cfa19b58 | 136 | The default priority is 50. |
cc7359ae MS |
137 | </p> |
138 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-s</strong><br> | |
139 | Do not report the resulting job IDs (silent mode.) | |
140 | </p> | |
141 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-t "</strong><em>name</em><strong>"</strong><br> | |
142 | Sets the job name. | |
143 | </p> | |
144 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-H </strong><em>hh:mm</em><br> | |
145 | </p> | |
146 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-H hold</strong><br> | |
147 | </p> | |
148 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-H immediate</strong><br> | |
149 | </p> | |
150 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-H restart</strong><br> | |
151 | </p> | |
152 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-H resume</strong><br> | |
153 | Specifies when the job should be printed. | |
154 | A value of <em>immediate</em> will print the file immediately, a value of <em>hold</em> will hold the job indefinitely, and a UTC time value (HH:MM) will hold the job until the specified UTC (not local) time. | |
155 | Use a value of <em>resume</em> with the <em>-i</em> option to resume a held job. | |
156 | Use a value of <em>restart</em> with the <em>-i</em> option to restart a completed job. | |
157 | </p> | |
158 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-P </strong><em>page-list</em><br> | |
159 | Specifies which pages to print in the document. | |
160 | The list can contain a list of numbers and ranges (#-#) separated by commas, e.g., "1,3-5,16". | |
161 | The page numbers refer to the output pages and not the document's original pages - options like "number-up" can affect the numbering of the pages. | |
162 | </p> | |
163 | <h3 id="lp-1.options.common-job-options">Common Job Options</h3> | |
164 | <p>Aside from the printer-specific options reported by the | |
4e3aaa5e | 165 | <a href="lpoptions.html"><strong>lpoptions</strong>(1)</a> |
cc7359ae | 166 | |
cfa19b58 | 167 | command, the following generic options are available: |
cc7359ae MS |
168 | </p> |
169 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-o job-sheets=</strong><em>name</em><br> | |
170 | Prints a cover page (banner) with the document. | |
171 | The "name" can be "classified", "confidential", "secret", "standard", "topsecret", or "unclassified". | |
172 | </p> | |
173 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-o media=</strong><em>size</em><br> | |
174 | Sets the page size to <em>size</em>. Most printers support at least the size names "a4", "letter", and "legal". | |
175 | </p> | |
176 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-o number-up=</strong>{<em>2|4|6|9|16</em>}<br> | |
177 | Prints 2, 4, 6, 9, or 16 document (input) pages on each output page. | |
178 | </p> | |
179 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-o orientation-requested=4</strong><br> | |
180 | Prints the job in landscape (rotated 90 degrees counter-clockwise). | |
181 | </p> | |
182 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-o orientation-requested=5</strong><br> | |
183 | Prints the job in landscape (rotated 90 degrees clockwise). | |
184 | </p> | |
185 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-o orientation-requested=6</strong><br> | |
186 | Prints the job in reverse portrait (rotated 180 degrees). | |
89936298 ZD |
187 | </p> |
188 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-o print-as-raster</strong><br> | |
189 | Prints the job as raster. | |
cc7359ae MS |
190 | </p> |
191 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-o print-quality=3</strong><br> | |
192 | </p> | |
193 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-o print-quality=4</strong><br> | |
194 | </p> | |
195 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-o print-quality=5</strong><br> | |
196 | Specifies the output quality - draft (3), normal (4), or best (5). | |
197 | </p> | |
198 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-o sides=one-sided</strong><br> | |
199 | Prints on one side of the paper. | |
200 | </p> | |
201 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-o sides=two-sided-long-edge</strong><br> | |
202 | Prints on both sides of the paper for portrait output. | |
203 | </p> | |
204 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-o sides=two-sided-short-edge</strong><br> | |
205 | Prints on both sides of the paper for landscape output. | |
3371c87e MS |
206 | </p> |
207 | <h2 id="lp-1.environment">Environment</h2> | |
208 | <p>The following environment variables override the default destination: | |
209 | </p> | |
210 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>LPDEST</strong><br> | |
211 | Specifies the default print queue (System V standard). | |
212 | </p> | |
213 | <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>PRINTER</strong><br> | |
214 | Specifies the default print queue (Berkeley standard). | |
cc7359ae MS |
215 | </p> |
216 | <h2 id="lp-1.conforming-to">Conforming To</h2> | |
217 | <p>Unlike the System V printing system, CUPS allows printer names to contain any printable character except SPACE, TAB, "/", or "#". | |
218 | Also, printer and class names are <em>not</em> case-sensitive. | |
219 | </p> | |
220 | <p>The <em>-q</em> option accepts a different range of values than the Solaris lp command, matching the IPP job priority values (1-100, 100 is highest priority) instead of the Solaris values (0-39, 0 is highest priority). | |
221 | </p> | |
222 | <h2 id="lp-1.examples">Examples</h2> | |
223 | <p>Print two copies of a document to the default printer: | |
224 | </p> | |
225 | <pre> | |
cfa19b58 MS |
226 | lp -n 2 filename |
227 | ||
94436c5a | 228 | </pre> |
cc7359ae MS |
229 | <p>Print a double-sided legal document to a printer called "foo": |
230 | </p> | |
231 | <pre> | |
cfa19b58 MS |
232 | lp -d foo -o media=legal -o sides=two-sided-long-edge filename |
233 | ||
94436c5a | 234 | </pre> |
cc7359ae MS |
235 | <p>Print a presentation document 2-up to a printer called "bar": |
236 | </p> | |
237 | <pre> | |
51c22b86 | 238 | lp -d bar -o number-up=2 filename |
94436c5a | 239 | </pre> |
cc7359ae | 240 | <h2 id="lp-1.see-also">See Also</h2> |
4e3aaa5e | 241 | <a href="cancel.html"><p><strong>cancel</strong>(1),</a> |
cc7359ae | 242 | |
4e3aaa5e | 243 | <a href="lpadmin.html"><strong>lpadmin</strong>(8),</a> |
cc7359ae | 244 | |
4e3aaa5e | 245 | <a href="lpoptions.html"><strong>lpoptions</strong>(1),</a> |
94436c5a | 246 | |
4e3aaa5e | 247 | <a href="lpq.html"><strong>lpq</strong>(1),</a> |
cc7359ae | 248 | |
4e3aaa5e | 249 | <a href="lpr.html"><strong>lpr</strong>(1),</a> |
cc7359ae | 250 | |
4e3aaa5e | 251 | <a href="lprm.html"><strong>lprm</strong>(1),</a> |
cc7359ae | 252 | |
4e3aaa5e | 253 | <a href="lpstat.html"><strong>lpstat</strong>(1),</a> |
cc7359ae MS |
254 | |
255 | CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>) | |
256 | </p> | |
257 | <h2 id="lp-1.copyright">Copyright</h2> | |
76b6aade | 258 | <p>Copyright © 2020-2024 by OpenPrinting. |
cc7359ae | 259 | </body> |
94436c5a | 260 | </html> |