📄 mailx.html
字号:
<dt><b>ask</b>, <b>asksub</b></dt><dd>Prompt for a subject line on outgoing mail if one is not specified on the command line with the <b>-s</b> option. The<b>ask</b> and <b>asksub</b> forms are synonyms; the system shall refer to <b>asksub</b> and <b>noasksub</b> in its messages, butshall accept <b>ask</b> and <b>noask</b> as user input to mean <b>asksub</b> and <b>noasksub</b>. It shall not be possible to setboth <b>ask</b> and <b>noasksub</b>, or <b>noask</b> and <b>asksub</b>. The default shall be <b>asksub</b>, but no prompting shallbe done if standard input is not a terminal.</dd><dt><b>askbcc</b></dt><dd>Prompt for the blind copy list. The default shall be <b>noaskbcc</b>.</dd><dt><b>askcc</b></dt><dd>Prompt for the copy list. The default shall be <b>noaskcc</b>.</dd><dt><b>autoprint</b></dt><dd>Enable automatic writing of messages after <b>delete</b> and <b>undelete</b> commands. The default shall be<b>noautoprint</b>.</dd><dt><b>bang</b></dt><dd>Enable the special-case treatment of exclamation marks ( <tt>'!'</tt> ) in escape command lines; see the <b>escape</b> commandand <a href="#tag_04_83_13_49">Command Escapes in mailx</a>. The default shall be <b>nobang</b>, disabling the expansion of<tt>'!'</tt> in the <i>command</i> argument to the <b>˜!</b> command and the <b>˜<!</b> <i>command</i> escape.</dd><dt><b>cmd</b>=<i>command</i></dt><dd>Set the default command to be invoked by the <b>pipe</b> command. The default shall be <b>nocmd</b>.</dd><dt><b>crt</b>=<i>number</i></dt><dd>Pipe messages having more than <i>number</i> lines through the command specified by the value of the <i>PAGER</i> variable. Thedefault shall be <b>nocrt</b>. If it is set to null, the value used is implementation-defined.</dd><dt><b>debug</b></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Enable verbose diagnostics for debugging. Messages are not delivered. The default shall be <b>nodebug</b>. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><b>dot</b></dt><dd>When <b>dot</b> is set, a period on a line by itself during message input from a terminal shall also signify end-of-file (inaddition to normal end-of-file). The default shall be <b>nodot</b>. If <b>ignoreeof</b> is set (see below), a setting of<b>nodot</b> shall be ignored and the period is the only method to terminate input mode.</dd><dt><b>escape</b>=<i>c</i></dt><dd>Set the command escape character to be the character <tt>'c'</tt>. By default, the command escape character shall be tilde. If<b>escape</b> is unset, tilde shall be used; if it is set to null, command escaping shall be disabled.</dd><dt><b>flipr</b></dt><dd>Reverse the meanings of the <b>R</b> and <b>r</b> commands. The default shall be <b>noflipr</b>.</dd><dt><b>folder</b>=<i>directory</i></dt><dd>The default directory for saving mail files. User-specified filenames beginning with a plus sign ( <tt>'+'</tt> ) shall be expandedby preceding the filename with this directory name to obtain the real pathname. If <i>directory</i> does not start with a slash (<tt>'/'</tt> ), the contents of <i>HOME</i> shall be prefixed to it. The default shall be <b>nofolder</b>. If <b>folder</b> isunset or set to null, user-specified filenames beginning with <tt>'+'</tt> shall refer to files in the current directory that beginwith the literal <tt>'+'</tt> character. See also <b>outfolder</b> below. The <b>folder</b> value need not affect the processing ofthe files named in <i>MBOX</i> and <i>DEAD .</i></dd><dt><b>header</b></dt><dd>Enable writing of the header summary when entering <i>mailx</i> in Receive Mode. The default shall be <b>header</b>.</dd><dt><b>hold</b></dt><dd>Preserve all messages that are read in the system mailbox instead of putting them in the <b>mbox</b> save file. The defaultshall be <b>nohold</b>.</dd><dt><b>ignore</b></dt><dd>Ignore interrupts while entering messages. The default shall be <b>noignore</b>.</dd><dt><b>ignoreeof</b></dt><dd>Ignore normal end-of-file during message input. Input can be terminated only by entering a period ( <tt>'.'</tt> ) on a line byitself or by the <b>˜.</b> command escape. The default shall be <b>noignoreeof</b>. See also <b>dot</b> above.</dd><dt><b>indentprefix</b>=<i>string</i></dt><dd>A string that shall be added as a prefix to each line that is inserted into the message by the <b>˜m</b> command escape. Thisvariable shall default to one <tab>.</dd><dt><b>keep</b></dt><dd>When a system mailbox, secondary mailbox, or <b>mbox</b> is empty, truncate it to zero length instead of removing it. Thedefault shall be <b>nokeep</b>.</dd><dt><b>keepsave</b></dt><dd>Keep the messages that have been saved from the system mailbox into other files in the file designated by the variable <i>MBOX,</i> instead of deleting them. The default shall be <b>nokeepsave</b>.</dd><dt><b>metoo</b></dt><dd>Suppress the deletion of the login name of the user from the recipient list when replying to a message or sending to a group.The default shall be <b>nometoo</b>.</dd><dt><b>onehop</b></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">When responding to a message that was originally sent to several recipients, the other recipient addresses are normally forced tobe relative to the originating author's machine for the response. This flag disables alteration of the recipients' addresses,improving efficiency in a network where all machines can send directly to all other machines (that is, one hop away). The defaultshall be <b>noonehop</b>. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><b>outfolder</b></dt><dd>Cause the files used to record outgoing messages to be located in the directory specified by the <b>folder</b> variable unlessthe pathname is absolute. The default shall be <b>nooutfolder</b>. See the <b>record</b> variable.</dd><dt><b>page</b></dt><dd>Insert a <form-feed> after each message sent through the pipe created by the <b>pipe</b> command. The default shall be<b>nopage</b>.</dd><dt><b>prompt</b>=<i>string</i></dt><dd>Set the command-mode prompt to <i>string</i>. If <i>string</i> is null or if <b>noprompt</b> is set, no prompting shall occur. Thedefault shall be to prompt with the string <tt>"? "</tt>.</dd><dt><b>quiet</b></dt><dd>Refrain from writing the opening message and version when entering <i>mailx</i>. The default shall be <b>noquiet</b>.</dd><dt><b>record</b>=<i>file</i></dt><dd>Record all outgoing mail in the file with the pathname <i>file</i>. The default shall be <b>norecord</b>. See also<b>outfolder</b> above.</dd><dt><b>save</b></dt><dd>Enable saving of messages in the dead-letter file on interrupt or delivery error. See the variable <i>DEAD</i> for the locationof the dead-letter file. The default shall be <b>save</b>.</dd><dt><b>screen</b>=<i>number</i></dt><dd>Set the number of lines in a screenful of headers for the <b>headers</b> and <b>z</b> commands. If <b>screen</b> is not specified,a value based on the terminal type identified by the <i>TERM</i> environment variable, the window size, the baud rate, or somecombination of these shall be used.</dd><dt><b>sendwait</b></dt><dd>Wait for the background mailer to finish before returning. The default shall be <b>nosendwait</b>.</dd><dt><b>showto</b></dt><dd>When the sender of the message was the user who is invoking <i>mailx</i>, write the information from the <b>To:</b> lineinstead of the <b>From:</b> line in the header summary. The default shall be <b>noshowto</b>.</dd><dt><b>sign</b>=<i>string</i></dt><dd>Set the variable inserted into the text of a message when the <b>˜a</b> command escape is given. The default shall be<b>nosign</b>. The character sequences <tt>'\t'</tt> and <tt>'\n'</tt> shall be recognized in the variable as <tab>s and<newline>s, respectively. (See also <b>˜i</b> in <a href="#tag_04_83_13_49">Command Escapes in mailx</a>.)</dd><dt><b>Sign</b>=<i>string</i></dt><dd>Set the variable inserted into the text of a message when the <b>˜A</b> command escape is given. The default shall be<b>noSign</b>. The character sequences <tt>'\t'</tt> and <tt>'\n'</tt> shall be recognized in the variable as <tab>s and<newline>s, respectively.</dd><dt><b>toplines</b>=<i>number</i></dt><dd>Set the number of lines of the message to write with the <b>top</b> command. The default shall be 5.</dd></dl><h5><a name="tag_04_83_13_03"></a>Commands in mailx</h5><p>The following <i>mailx</i> commands shall be provided. In the following list, header refers to lines from the message header, asshown in the OUTPUT FILES section. Header-line refers to lines within the header that begin with one or more non-white-spacecharacters, immediately followed by a colon and white space and continuing until the next line beginning with a non-white-spacecharacter or an empty line. Header-field refers to the portion of a header line prior to the first colon in that line.</p><p>For each of the commands listed below, the command can be entered as the abbreviation (those characters in the Synopsis commandword preceding the <tt>'['</tt> ), the full command (all characters shown for the command word, omitting the <tt>'['</tt> and<tt>']'</tt> ), or any truncation of the full command down to the abbreviation. For example, the <b>exit</b> command (shown as<b>ex[it]</b> in the Synopsis) can be entered as <b>ex</b>, <b>exi</b>, or <b>exit</b>.</p><p>The arguments to commands can be quoted, using the following methods:</p><ul><li><p>An argument can be enclosed between paired double-quotes ( <tt>""</tt> ) or single-quotes ( <tt>''</tt> ); any white space,shell word expansion, or backslash characters within the quotes shall be treated literally as part of the argument. A double-quoteshall be treated literally within single-quotes and <i>vice versa</i>. These special properties of the quote marks shall occur onlywhen they are paired at the beginning and end of the argument.</p></li><li><p>A backslash outside of the enclosing quotes shall be discarded and the following character treated literally as part of theargument.</p></li><li><p>An unquoted backslash at the end of a command line shall be discarded and the next line shall continue the command.</p></li></ul><p>Filenames, where expected, shall be subjected to the following transformations, in sequence:</p><ul><li><p>If the filename begins with an unquoted plus sign, and the <b>folder</b> variable is defined (see the <b>folder</b> variable),the plus sign shall be replaced by the value of the <b>folder</b> variable followed by a slash. If the <b>folder</b> variable isunset or is set to null, the filename shall be unchanged.</p></li><li><p>Shell word expansions shall be applied to the filename (see <a href="xcu_chap02.html#tag_02_06"><i>Word Expansions</i></a>). Ifmore than a single pathname results from this expansion and the command is expecting one file, the effects are unspecified.</p></li></ul><h5><a name="tag_04_83_13_04"></a>Declare Aliases</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>a</tt><b>[</b><tt>lias</tt><b>] [</b><i>alias</i> <b>[</b><i>address</i><tt>...</tt><b>]]</b><tt>g</tt><b>[</b><tt>roup</tt><b>] [</b><i>alias</i> <b>[</b><i>address</i><tt>...</tt><b>]]</b></pre></dd></dl><p>Add the given addresses to the alias specified by <i>alias</i>. The names shall be substituted when <i>alias</i> is used as arecipient address specified by the user in an outgoing message (that is, other recipients addressed indirectly through the<b>reply</b> command shall not be substituted in this manner). Mail address alias substitution shall apply only when the aliasstring is used as a full address; for example, when <b>hlj</b> is an alias, <i>hlj@posix.com</i> does not trigger the aliassubstitution. If no arguments are given, write a listing of the current aliases to standard output. If only an <i>alias</i>argument is given, write a listing of the specified alias to standard output. These listings need not reflect the same order ofaddresses that were entered.</p><h5><a name="tag_04_83_13_05"></a>Declare Alternatives</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>alt</tt><b>[</b><tt>ernates</tt><b>]</b> <i>name</i><tt>...</tt></pre></dd></dl><p>(See also the <b>metoo</b> command.) Declare a list of alternative names for the user's login. When responding to a message,these names shall be removed from the list of recipients for the response. The comparison of names shall be in a case-insensitivemanner. With no arguments, <b>alternates</b> shall write the current list of alternative names.</p><h5><a name="tag_04_83_13_06"></a>Change Current Directory</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>cd</tt> <b>[</b><i>directory</i><b>]</b><tt>ch</tt><b>[</b><tt>dir</tt><b>] [</b><i>directory</i><b>]</b></pre></dd></dl><p>Change directory. If <i>directory</i> is not specified, the contents of <i>HOME</i> shall be used.</p><h5><a name="tag_04_83_13_07"></a>Copy Messages</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>c</tt><b>[</b><tt>opy</tt><b>] [</b><i>file</i><b>]</b><tt>c</tt><b>[</b><tt>opy</tt><b>] [</b><i>msglist</i><b>]</b> <i>file</i><tt>C</tt><b>[</b><tt>opy</tt><b>] [</b><i>msglist</i><b>]</b></pre></dd></dl><p>Copy messages to the file named by the pathname <i>file</i> without marking the messages as saved. Otherwise, it shall beequivalent to the <b>save</b> command.</p><p>In the capitalized form, save the specified messages in a file whose name is derived from the author of the message to be saved,without marking the messages as saved. Otherwise, it shall be equivalent to the <b>Save</b> command.</p><h5><a name="tag_04_83_13_08"></a>Delete Messages</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>d</tt><b>[</b><tt>elete</tt><b>] [</b><i>msglist</i><b>]</b></pre></dd></dl><p>Mark messages for deletion from the mailbox. The deletions shall not occur until <i>mailx</i> quits (see the <b>quit</b>command) or changes mailboxes (see the <b>folder</b> command). If <b>autoprint</b> is set and there are messages remaining afterthe <b>delete</b> command, the current message shall be written as described for the <b>print</b> command (see the <b>print</b>command); otherwise, the <i>mailx</i> prompt shall be written.</p><h5><a name="tag_04_83_13_09"></a>Discard Header Fields</h5><dl compact><dt><i>Synopsis</i>:</dt>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -