⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 printing-using.html

📁 FreeBSD操作系统的详细使用手册
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</dd><dt>lprm</dt><dd><p>With no job number, user name, or <var class="OPTION">-</var> appearing on the commandline, <a href="http://www.FreeBSD.org/cgi/man.cgi?query=lprm&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">lprm</span>(1)</span></a> removes thecurrently active job on the default printer, if it belongs to you. The superuser canremove any active job.</p></dd></dl></div><p>Just use the <var class="OPTION">-P</var> option with the above shortcuts to operateon a specific printer instead of the default. For example, the following command removesall jobs for the current user in the queue for the printer named <varclass="LITERAL">rattan</var>:</p><pre class="SCREEN"><samp class="PROMPT">%</samp> <kbd class="USERINPUT">lprm -P rattan -</kbd></pre><div class="NOTE"><blockquote class="NOTE"><p><b>Note:</b> If you are working in a networked environment, <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=lprm&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">lprm</span>(1)</span></a> will let youremove jobs only from the host from which the jobs were submitted, even if the sameprinter is available from other hosts. The following command sequence demonstratesthis:</p><pre class="SCREEN"><samp class="PROMPT">%</samp> <kbd class="USERINPUT">lpr -P rattan myfile</kbd><samp class="PROMPT">%</samp> <kbd class="USERINPUT">rlogin orchid</kbd><samp class="PROMPT">%</samp> <kbd class="USERINPUT">lpq -P rattan</kbd>Rank   Owner      Job  Files                          Total Sizeactive seeyan     12    ...                           49123 bytes2nd    kelly      13   myfile                         12 bytes<samp class="PROMPT">%</samp> <kbd class="USERINPUT">lprm -P rattan 13</kbd>rose: Permission denied<samp class="PROMPT">%</samp> <kbd class="USERINPUT">logout</kbd><samp class="PROMPT">%</samp> <kbd class="USERINPUT">lprm -P rattan 13</kbd>dfA013rose dequeuedcfA013rose dequeued   </pre></blockquote></div></div><div class="SECT2"><h2 class="SECT2"><a id="PRINTING-LPR-OPTIONS" name="PRINTING-LPR-OPTIONS">9.5.4 BeyondPlain Text: Printing Options</a></h2><p>The <a href="http://www.FreeBSD.org/cgi/man.cgi?query=lpr&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">lpr</span>(1)</span></a> commandsupports a number of options that control formatting text, converting graphic and otherfile formats, producing multiple copies, handling of the job, and more. This sectiondescribes the options.</p><div class="SECT3"><h3 class="SECT3"><a id="PRINTING-LPR-OPTIONS-FORMAT"name="PRINTING-LPR-OPTIONS-FORMAT">9.5.4.1 Formatting and Conversion Options</a></h3><p>The following <a href="http://www.FreeBSD.org/cgi/man.cgi?query=lpr&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">lpr</span>(1)</span></a> options controlformatting of the files in the job. Use these options if the job does not contain plaintext or if you want plain text formatted through the <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=pr&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">pr</span>(1)</span></a> utility.</p><p>For example, the following command prints a DVI file (from the <bclass="APPLICATION">TeX</b> typesetting system) named <ttclass="FILENAME">fish-report.dvi</tt> to the printer named <varclass="LITERAL">bamboo</var>:</p><pre class="SCREEN"><samp class="PROMPT">%</samp> <kbdclass="USERINPUT">lpr -P bamboo -d fish-report.dvi</kbd></pre><p>These options apply to every file in the job, so you cannot mix (say) DVI and ditrofffiles together in a job. Instead, submit the files as separate jobs, using a differentconversion option for each job.</p><div class="NOTE"><blockquote class="NOTE"><p><b>Note:</b> All of these options except <var class="OPTION">-p</var> and <varclass="OPTION">-T</var> require conversion filters installed for the destination printer.For example, the <var class="OPTION">-d</var> option requires the DVI conversion filter.Section <a href="printing-advanced.html#PRINTING-ADVANCED-CONVFILTERS">ConversionFilters</a> gives details.</p></blockquote></div><div class="VARIABLELIST"><dl><dt><var class="OPTION">-c</var></dt><dd><p>Print cifplot files.</p></dd><dt><var class="OPTION">-d</var></dt><dd><p>Print DVI files.</p></dd><dt><var class="OPTION">-f</var></dt><dd><p>Print FORTRAN text files.</p></dd><dt><var class="OPTION">-g</var></dt><dd><p>Print plot data.</p></dd><dt><var class="OPTION">-i <var class="REPLACEABLE">number</var></var></dt><dd><p>Indent the output by <var class="REPLACEABLE">number</var> columns; if you omit <varclass="REPLACEABLE">number</var>, indent by 8 columns. This option works only withcertain conversion filters.</p><div class="NOTE"><blockquote class="NOTE"><p><b>Note:</b> Do not put any space between the <var class="OPTION">-i</var> and thenumber.</p></blockquote></div></dd><dt><var class="OPTION">-l</var></dt><dd><p>Print literal text data, including control characters.</p></dd><dt><var class="OPTION">-n</var></dt><dd><p>Print ditroff (device independent troff) data.</p></dd><dt>-p</dt><dd><p>Format plain text with <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=pr&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">pr</span>(1)</span></a> before printing.See <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pr&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">pr</span>(1)</span></a> for moreinformation.</p></dd><dt><var class="OPTION">-T <var class="REPLACEABLE">title</var></var></dt><dd><p>Use <var class="REPLACEABLE">title</var> on the <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=pr&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">pr</span>(1)</span></a> header insteadof the file name. This option has effect only when used with the <varclass="OPTION">-p</var> option.</p></dd><dt><var class="OPTION">-t</var></dt><dd><p>Print troff data.</p></dd><dt><var class="OPTION">-v</var></dt><dd><p>Print raster data.</p></dd></dl></div><p>Here is an example: this command prints a nicely formatted version of the <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=ls&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">ls</span>(1)</span></a> manual page onthe default printer:</p><pre class="SCREEN"><samp class="PROMPT">%</samp> <kbdclass="USERINPUT">zcat /usr/share/man/man1/ls.1.gz | troff -t -man | lpr -t</kbd></pre><p>The <a href="http://www.FreeBSD.org/cgi/man.cgi?query=zcat&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">zcat</span>(1)</span></a> commanduncompresses the source of the <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=ls&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">ls</span>(1)</span></a> manual page andpasses it to the <a href="http://www.FreeBSD.org/cgi/man.cgi?query=troff&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">troff</span>(1)</span></a> command,which formats that source and makes GNU troff output and passes it to <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=lpr&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">lpr</span>(1)</span></a>, which submitsthe job to the <b class="APPLICATION">LPD</b> spooler. Because we used the <varclass="OPTION">-t</var> option to <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=lpr&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">lpr</span>(1)</span></a>, the spoolerwill convert the GNU troff output into a format the default printer can understand whenit prints the job.</p></div><div class="SECT3"><h3 class="SECT3"><a id="PRINTING-LPR-OPTIONS-JOB-HANDLING"name="PRINTING-LPR-OPTIONS-JOB-HANDLING">9.5.4.2 Job Handling Options</a></h3><p>The following options to <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=lpr&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">lpr</span>(1)</span></a> tell <bclass="APPLICATION">LPD</b> to handle the job specially:</p><div class="VARIABLELIST"><dl><dt>-# <var class="REPLACEABLE">copies</var></dt><dd><p>Produce a number of <var class="REPLACEABLE">copies</var> of each file in the jobinstead of just one copy. An administrator may disable this option to reduce printerwear-and-tear and encourage photocopier usage. See section <ahref="printing-advanced.html#PRINTING-ADVANCED-RESTRICTING-COPIES">Restricting MultipleCopies</a>.</p><p>This example prints three copies of <tt class="FILENAME">parser.c</tt> followed bythree copies of <tt class="FILENAME">parser.h</tt> to the default printer:</p><pre class="SCREEN"><samp class="PROMPT">%</samp> <kbd class="USERINPUT">lpr -#3 parser.c parser.h</kbd></pre></dd><dt>-m</dt><dd><p>Send mail after completing the print job. With this option, the <bclass="APPLICATION">LPD</b> system will send mail to your account when it finisheshandling your job. In its message, it will tell you if the job completed successfully orif there was an error, and (often) what the error was.</p></dd><dt>-s</dt><dd><p>Do not copy the files to the spooling directory, but make symbolic links to theminstead.</p><p>If you are printing a large job, you probably want to use this option. It saves spacein the spooling directory (your job might overflow the free space on the filesystem wherethe spooling directory resides). It saves time as well since <bclass="APPLICATION">LPD</b> will not have to copy each and every byte of your job to thespooling directory.</p><p>There is a drawback, though: since <b class="APPLICATION">LPD</b> will refer to theoriginal files directly, you cannot modify or remove them until they have beenprinted.</p><div class="NOTE">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -