📄 lp.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta name="generator" content="HTML Tidy, see www.w3.org"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 --><!-- Copyright (c) 2001-2003 The Open Group, All Rights Reserved --><title>lp</title></head><body bgcolor="white"><script type="text/javascript" language="JavaScript" src="../jscript/codes.js"></script><basefont size="3"> <a name="lp"></a> <a name="tag_04_80"></a><!-- lp --> <!--header start--><center><font size="2">The Open Group Base Specifications Issue 6<br>IEEE Std 1003.1, 2003 Edition<br>Copyright © 2001-2003 The IEEE and The Open Group, All Rights reserved.</font></center><!--header end--><hr size="2" noshade><h4><a name="tag_04_80_01"></a>NAME</h4><blockquote>lp - send files to a printer</blockquote><h4><a name="tag_04_80_02"></a>SYNOPSIS</h4><blockquote class="synopsis"><p><code><tt>lp</tt> <b>[</b><tt>-c</tt><b>][</b><tt>-d</tt> <i>dest</i><b>][</b><tt>-n</tt><i>copies</i><b>][</b><tt>-msw</tt><b>][</b><tt>-o</tt> <i>option</i><b>]</b><tt>...</tt> <b>[</b><tt>-t</tt><i>title</i><b>][</b><i>file</i><tt>...</tt><b>]</b></code></p></blockquote><h4><a name="tag_04_80_03"></a>DESCRIPTION</h4><blockquote><p>The <i>lp</i> utility shall copy the input files to an output destination in an unspecified manner. The default outputdestination should be to a hardcopy device, such as a printer or microfilm recorder, that produces non-volatile, human-readabledocuments. If such a device is not available to the application, or if the system provides no such device, the <i>lp</i> utilityshall exit with a non-zero exit status.</p><p>The actual writing to the output device may occur some time after the <i>lp</i> utility successfully exits. During the portionof the writing that corresponds to each input file, the implementation shall guarantee exclusive access to the device.</p><p>The <i>lp</i> utility shall associate a unique <i>request ID</i> with each request.</p><p>Normally, a banner page is produced to separate and identify each print job. This page may be suppressed byimplementation-defined conditions, such as an operator command or one of the <b>-o</b> <i>option</i> values.</p></blockquote><h4><a name="tag_04_80_04"></a>OPTIONS</h4><blockquote><p>The <i>lp</i> utility shall conform to the Base Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap12.html#tag_12_02">Section 12.2, Utility Syntax Guidelines</a>.</p><p>The following options shall be supported:</p><dl compact><dt><b>-c</b></dt><dd>Exit only after further access to any of the input files is no longer required. The application can then safely delete ormodify the files without affecting the output operation. Normally, files are not copied, but are linked whenever possible. If the<b>-c</b> option is not given, then the user should be careful not to remove any of the files before the request has been printedin its entirety. It should also be noted that in the absence of the <b>-c</b> option, any changes made to the named files after therequest is made but before it is printed may be reflected in the printed output. On some implementations, <b>-c</b> may be on bydefault.</dd><dt><b>-d </b> <i>dest</i></dt><dd>Specify a string that names the destination ( <i>dest</i>). If <i>dest</i> is a printer, the request shall be printed only onthat specific printer. If <i>dest</i> is a class of printers, the request shall be printed on the first available printer that is amember of the class. Under certain conditions (printer unavailability, file space limitation, and so on), requests for specificdestinations need not be accepted. Destination names vary between systems. <p>If <b>-d</b> is not specified, and neither the <i>LPDEST</i> nor <i>PRINTER</i> environment variable is set, an unspecifieddestination is used. The <b>-d</b> <i>dest</i> option shall take precedence over <i>LPDEST ,</i> which in turn shall takeprecedence over <i>PRINTER .</i> Results are undefined when <i>dest</i> contains a value that is not a valid destination name.</p></dd><dt><b>-m</b></dt><dd>Send mail (see <a href="mailx.html"><i>mailx</i></a> ) after the files have been printed. By default, no mail is sent uponnormal completion of the print request.</dd><dt><b>-n </b> <i>copies</i></dt><dd>Write <i>copies</i> number of copies of the files, where <i>copies</i> is a positive decimal integer. The methods for producingmultiple copies and for arranging the multiple copies when multiple <i>file</i> operands are used are unspecified, except that eachfile shall be output as an integral whole, not interleaved with portions of other files.</dd><dt><b>-o </b> <i>option</i></dt><dd>Specify printer-dependent or class-dependent <i>option</i>s. Several such <i>option</i>s may be collected by specifying the<b>-o</b> option more than once.</dd><dt><b>-s</b></dt><dd>Suppress messages from <i>lp</i>.</dd><dt><b>-t </b> <i>title</i></dt><dd>Write <i>title</i> on the banner page of the output.</dd><dt><b>-w</b></dt><dd>Write a message on the user's terminal after the files have been printed. If the user is not logged in, then mail shall be sentinstead.</dd></dl></blockquote><h4><a name="tag_04_80_05"></a>OPERANDS</h4><blockquote><p>The following operand shall be supported:</p><dl compact><dt><i>file</i></dt><dd>A pathname of a file to be output. If no <i>file</i> operands are specified, or if a <i>file</i> operand is <tt>'-'</tt> , thestandard input shall be used. If a <i>file</i> operand is used, but the <b>-c</b> option is not specified, the process performingthe writing to the output device may have user and group permissions that differ from that of the process invoking <i>lp</i>.</dd></dl></blockquote><h4><a name="tag_04_80_06"></a>STDIN</h4><blockquote><p>The standard input shall be used only if no <i>file</i> operands are specified, or if a <i>file</i> operand is <tt>'-'</tt> .See the INPUT FILES section.</p></blockquote><h4><a name="tag_04_80_07"></a>INPUT FILES</h4><blockquote><p>The input files shall be text files.</p></blockquote><h4><a name="tag_04_80_08"></a>ENVIRONMENT VARIABLES</h4><blockquote><p>The following environment variables shall affect the execution of <i>lp</i>:</p><dl compact><dt><i>LANG</i></dt><dd>Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume ofIEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap08.html#tag_08_02">Section 8.2, Internationalization Variables</a> forthe precedence of internationalization variables used to determine the values of locale categories.)</dd><dt><i>LC_ALL</i></dt><dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd><dt><i>LC_CTYPE</i></dt><dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte asopposed to multi-byte characters in arguments and input files).</dd><dt><i>LC_MESSAGES</i></dt><dd>Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error andinformative messages written to standard output.</dd><dt><i>LC_TIME</i></dt><dd>Determine the format and contents of date and time strings displayed in the <i>lp</i> banner page, if any.</dd><dt><i>LPDEST</i></dt><dd>Determine the destination. If the <i>LPDEST</i> environment variable is not set, the <i>PRINTER</i> environment variable shallbe used. The <b>-d</b> <i>dest</i> option takes precedence over <i>LPDEST .</i> Results are undefined when <b>-d</b> is notspecified and <i>LPDEST</i> contains a value that is not a valid destination name.</dd><dt><i>NLSPATH</i></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Determine the location of message catalogs for the processing of <i>LC_MESSAGES .</i> <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><i>PRINTER</i></dt><dd>Determine the output device or destination. If the <i>LPDEST</i> and <i>PRINTER</i> environment variables are not set, anunspecified output device is used. The <b>-d</b> <i>dest</i> option and the <i>LPDEST</i> environment variable shall takeprecedence over <i>PRINTER .</i> Results are undefined when <b>-d</b> is not specified, <i>LPDEST</i> is unset, and <i>PRINTER</i>contains a value that is not a valid device or destination name.</dd><dt><i>TZ</i></dt><dd>Determine the timezone used to calculate date and time strings displayed in the <i>lp</i> banner page, if any. If <i>TZ</i> isunset or null, an unspecified default timezone shall be used.</dd></dl></blockquote><h4><a name="tag_04_80_09"></a>ASYNCHRONOUS EVENTS</h4><blockquote><p>Default.</p></blockquote><h4><a name="tag_04_80_10"></a>STDOUT</h4><blockquote><p>The <i>lp</i> utility shall write a <i>request ID</i> to the standard output, unless <b>-s</b> is specified. The format of themessage is unspecified. The request ID can be used on systems supporting the historical <i>cancel</i> and <i>lpstat</i>utilities.</p></blockquote><h4><a name="tag_04_80_11"></a>STDERR</h4><blockquote><p>The standard error shall be used only for diagnostic messages.</p></blockquote><h4><a name="tag_04_80_12"></a>OUTPUT FILES</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_04_80_13"></a>EXTENDED DESCRIPTION</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_04_80_14"></a>EXIT STATUS</h4>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -