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

📄 printing-using.html

📁 FreeBSD安装说明概述 FreeBSD 提供了一个以文字为主
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<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 <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">pr</span>(1)</span> before printing. See <spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">pr</span>(1)</span> 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 <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">pr</span>(1)</span> header instead of the file name. This optionhas effect only when used with the <var class="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 <spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">ls</span>(1)</span> manual page on thedefault 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 <span class="CITEREFENTRY"><span class="REFENTRYTITLE">zcat</span>(1)</span>command uncompresses the source of the <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">ls</span>(1)</span> manual page and passes it to the <spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">troff</span>(1)</span> command, whichformats that source and makes GNU troff output and passes it to <spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">lpr</span>(1)</span>, which submits thejob to the <b class="APPLICATION">LPD</b> spooler. Because we used the <varclass="OPTION">-t</var> option to <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">lpr</span>(1)</span>, the spooler will convert the GNU troff outputinto a format the default printer can understand when it prints the job.</p></div><div class="SECT3"><h3 class="SECT3"><a id="PRINTING-LPR-OPTIONS-JOB-HANDLING"name="PRINTING-LPR-OPTIONS-JOB-HANDLING">11.5.4.2. Job Handling Options</a></h3><p>The following options to <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">lpr</span>(1)</span> tell <b class="APPLICATION">LPD</b> to handlethe 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"><blockquote class="NOTE"><p><b>Note:</b> If you are printing to a remote printer, <b class="APPLICATION">LPD</b>will eventually have to copy files from the local host to the remote host, so the <varclass="OPTION">-s</var> option will save space only on the local spooling directory, notthe remote. It is still useful, though.</p></blockquote></div></dd><dt>-r</dt><dd><p>Remove the files in the job after copying them to the spooling directory, or afterprinting them with the <var class="OPTION">-s</var> option. Be careful with thisoption!</p></dd></dl></div></div><div class="SECT3"><h3 class="SECT3"><a id="PRINTING-LPR-OPTIONS-MISC"name="PRINTING-LPR-OPTIONS-MISC">11.5.4.3. Header Page Options</a></h3><p>These options to <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">lpr</span>(1)</span> adjust the text that normally appears on ajob's header page. If header pages are suppressed for the destination printer, theseoptions have no effect. See section <ahref="printing-advanced.html#PRINTING-ADVANCED-HEADER-PAGES">Header Pages</a> forinformation about setting up header pages.</p><div class="VARIABLELIST"><dl><dt>-C <var class="REPLACEABLE">text</var></dt><dd><p>Replace the hostname on the header page with <var class="REPLACEABLE">text</var>. Thehostname is normally the name of the host from which the job was submitted.</p></dd><dt>-J <var class="REPLACEABLE">text</var></dt><dd><p>Replace the job name on the header page with <var class="REPLACEABLE">text</var>. Thejob name is normally the name of the first file of the job, or <ttclass="FILENAME">stdin</tt> if you are printing standard input.</p></dd><dt>-h</dt><dd><p>Do not print any header page.</p><div class="NOTE"><blockquote class="NOTE"><p><b>Note:</b> At some sites, this option may have no effect due to the way header pagesare generated. See <a href="printing-advanced.html#PRINTING-ADVANCED-HEADER-PAGES">HeaderPages</a> for details.</p></blockquote></div></dd></dl></div></div></div><div class="SECT2"><h2 class="SECT2"><a id="PRINTING-LPC" name="PRINTING-LPC">11.5.5. AdministeringPrinters</a></h2><p>As an administrator for your printers, you have had to install, set up, and test them.Using the <span class="CITEREFENTRY"><span class="REFENTRYTITLE">lpc</span>(8)</span>command, you can interact with your printers in yet more ways. With <spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">lpc</span>(8)</span>, you can</p><ul><li><p>Start and stop the printers</p></li><li><p>Enable and disable their queues</p></li><li><p>Rearrange the order of the jobs in each queue.</p></li></ul><p>First, a note about terminology: if a printer is <span class="emphasis"><iclass="EMPHASIS">stopped</i></span>, it will not print anything in its queue. Users canstill submit jobs, which will wait in the queue until the printer is <spanclass="emphasis"><i class="EMPHASIS">started</i></span> or the queue is cleared.</p><p>If a queue is <span class="emphasis"><i class="EMPHASIS">disabled</i></span>, no user(except <tt class="USERNAME">root</tt>) can submit jobs for the printer. An <spanclass="emphasis"><i class="EMPHASIS">enabled</i></span> queue allows jobs to besubmitted. A printer can be <span class="emphasis"><i class="EMPHASIS">started</i></span>for a disabled queue, in which case it will continue to print jobs in the queue until thequeue is empty.</p><p>In general, you have to have <tt class="USERNAME">root</tt> privileges to use the<span class="CITEREFENTRY"><span class="REFENTRYTITLE">lpc</span>(8)</span> command.Ordinary users can use the <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">lpc</span>(8)</span> command to get printer status and to restart ahung printer only.</p><p>Here is a summary of the <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">lpc</span>(8)</span> commands. Most of the commands take a <varclass="REPLACEABLE">printer-name</var> argument to tell on which printer to operate. Youcan use <var class="LITERAL">all</var> for the <varclass="REPLACEABLE">printer-name</var> to mean all printers listed in <ttclass="FILENAME">/etc/printcap</tt>.</p><div class="VARIABLELIST"><dl><dt><tt class="COMMAND">abort <var class="REPLACEABLE">printer-name</var></tt></dt><dd><p>Cancel the current job and stop the printer. Users can still submit jobs if the queueis enabled.</p></dd><dt><tt class="COMMAND">clean <var class="REPLACEABLE">printer-name</var></tt></dt><dd><p>Remove old files from the printer's spooling directory. Occasionally, the files thatmake up a job are not properly removed by <b class="APPLICATION">LPD</b>, particularly ifthere have been errors during printing or a lot of administrative activity. This commandfinds files that do not belong in the spooling directory and removes them.</p></dd><dt><tt class="COMMAND">disable <var class="REPLACEABLE">printer-name</var></tt></dt><dd><p>Disable queuing of new jobs. If the printer is running, it will continue to print anyjobs remaining in the queue. The superuser (<tt class="USERNAME">root</tt>) can alwayssubmit jobs, even to a disabled queue.</p><p>This command is useful while you are testing a new printer or filter installation:disable the queue and submit jobs as <tt class="USERNAME">root</tt>. Other users will notbe able to submit jobs until you complete your testing and re-enable the queue with the<tt class="COMMAND">enable</tt> command.</p></dd><dt><tt class="COMMAND">down <var class="REPLACEABLE">printer-name</var> <varclass="REPLACEABLE">message</var></tt></dt><dd><p>Take a printer down. Equivalent to <tt class="COMMAND">disable</tt> followed by <ttclass="COMMAND">stop</tt>. The <var class="REPLACEABLE">message</var> appears as theprinter's status whenever a user checks the printer's queue with <spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">lpq</span>(1)</span> or status with <ttclass="COMMAND">lpc status</tt>.</p></dd><dt><tt class="COMMAND">enable <var class="REPLACEABLE">printer-name</var></tt></dt><dd><p>Enable the queue for a printer. Users can submit jobs but the printer will not printanything until it is started.</p></dd><dt><tt class="COMMAND">help <var class="REPLACEABLE">command-name</var></tt></dt><dd><p>Print help on the command <var class="REPLACEABLE">command-name</var>. With no <varclass="REPLACEABLE">command-name</var>, print a summary of the commands available.</p></dd><dt><tt class="COMMAND">restart <var class="REPLACEABLE">printer-name</var></tt></dt><dd><p>Start the printer. Ordinary users can use this command if some extraordinarycircumstance hangs <b class="APPLICATION">LPD</b>, but they cannot start a printerstopped with either the <tt class="COMMAND">stop</tt> or <tt class="COMMAND">down</tt>commands. The <tt class="COMMAND">restart</tt> command is equivalent to <ttclass="COMMAND">abort</tt> followed by <tt class="COMMAND">start</tt>.</p></dd><dt><tt class="COMMAND">start <var class="REPLACEABLE">printer-name</var></tt></dt><dd><p>Start the printer. The printer will print jobs in its queue.</p></dd><dt><tt class="COMMAND">stop <var class="REPLACEABLE">printer-name</var></tt></dt><dd><p>Stop the printer. The printer will finish the current job and will not print anythingelse in its queue. Even though the printer is stopped, users can still submit jobs to anenabled queue.</p></dd><dt><tt class="COMMAND">topq <var class="REPLACEABLE">printer-name</var> <varclass="REPLACEABLE">job-or-username</var></tt></dt><dd><p>Rearrange the queue for <var class="REPLACEABLE">printer-name</var> by placing thejobs with the listed <var class="REPLACEABLE">job</var> numbers or the jobs belonging to<var class="REPLACEABLE">username</var> at the top of the queue. For this command, youcannot use <var class="LITERAL">all</var> as the <varclass="REPLACEABLE">printer-name</var>.</p></dd><dt><tt class="COMMAND">up <var class="REPLACEABLE">printer-name</var></tt></dt><dd><p>Bring a printer up; the opposite of the <tt class="COMMAND">down</tt> command.Equivalent to <tt class="COMMAND">start</tt> followed by <ttclass="COMMAND">enable</tt>.</p></dd></dl></div><p><span class="CITEREFENTRY"><span class="REFENTRYTITLE">lpc</span>(8)</span> acceptsthe above commands on the command line. If you do not enter any commands, <spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">lpc</span>(8)</span> enters aninteractive mode, where you can enter commands until you type <ttclass="COMMAND">exit</tt>, <tt class="COMMAND">quit</tt>, or end-of-file.</p></div></div><div class="NAVFOOTER"><hr align="LEFT" width="100%" /><table summary="Footer navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><td width="33%" align="left" valign="top"><a href="printing-advanced.html"accesskey="P">Prev</a></td><td width="34%" align="center" valign="top"><a href="index.html"accesskey="H">Home</a></td><td width="33%" align="right" valign="top"><a href="printing-lpd-alternatives.html"accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">Advanced Printer Setup</td><td width="34%" align="center" valign="top"><a href="printing.html"accesskey="U">Up</a></td><td width="33%" align="right" valign="top">Alternatives to the Standard Spooler</td></tr></table></div></body></html>

⌨️ 快捷键说明

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