📄 mail.1
字号:
in his system mailbox, and removing all other messages from his systemmailbox.If new mail has arrived during the session, the message.Dq Li "You have new mail"is given.If given while editing amailbox file with the.Fl fflag, then the edit file is rewritten.A return to the Shell iseffected, unless the rewrite of edit file fails, in which case the usercan escape with the.Ic exitcommand..It Ic reply.Pq Ic rTakes a message list and sends mail to the sender and allrecipients of the specified message.The default message must not be deleted..It Ic respondA synonym for.Ic reply ..It Ic retainAdd the list of header fields named to the.Ar retained listOnly the header fields in the retain listare shown on your terminal when you print a message.All other header fields are suppressed.The.Ic Typeand.Ic Printcommands can be used to print a message in its entirety.If.Ic retainis executed with no arguments, it lists the current set ofretained fields..It Ic save.Pq Ic sTakes a message list and a filename and appends each message inturn to the end of the file.The filename in quotes, followed by the linecount and character count is echoed on the user's terminal..It Ic set.Pq Ic seWith no arguments, prints all variable values.Otherwise, setsoption.Arguments are of the form.Ar option=value(no space before or after =) or.Ar option .Quotation marks may be placed around any part of the assignment statement toquote blanks or tabs, i.e..Dq Li "set indentprefix=\*q->\*q".It Ic saveignore.Ic Saveignoreis to.Ic savewhat.Ic ignoreis to.Ic printand.Ic type .Header fields thus marked are filtered out whensaving a message by.Ic saveor when automatically saving to.Ar mbox ..It Ic saveretain.Ic Saveretainis to.Ic savewhat.Ic retainis to.Ic printand.Ic type .Header fields thus marked are the only ones savedwith a message when saving by.Ic saveor when automatically saving to.Ar mbox ..Ic Saveretainoverrides.Ic saveignore ..It Ic shell.Pq Ic shInvokes an interactive version of the shell..It Ic sizeTakes a message list and prints out the size in characters of eachmessage..It Ic sourceThe.Ic sourcecommand readscommands from a file..It Ic topTakes a message list and prints the top few lines of each.The number oflines printed is controlled by the variable.Ic toplinesand defaults to five..It Ic type.Pq Ic tA synonym for.Ic print ..It Ic unaliasTakes a list of names defined by.Ic aliascommands and discards the remembered groups of users.The group namesno longer have any significance..It Ic undelete.Pq Ic uTakes a message list and marks each message as.Ic notbeing deleted..It Ic unread.Pq Ic UTakes a message list and marks each message as.Ic nothaving been read..It Ic unsetTakes a list of option names and discards their remembered values;the inverse of.Ic set ..It Ic visual.Pq Ic vTakes a message list and invokes the display editor on each message..It Ic write.Pq Ic wSimilar to.Ic save ,except that.Ic onlythe message body.Pq Ar withoutthe header) is saved.Extremely useful for such tasks as sending and receiving sourceprogram text over the message system..It Ic xit.Pq Ic xA synonym for.Ic exit ..It Ic z.Nm Mailpresents message headers in windowfuls as described under the.Ic headerscommand.You can move.Nm mail Ns 'sattention forward to the next window with the.Ic \&zcommand.Also, you can move to the previous window by using.Ic \&z\&\- ..El.Ss Tilde/Escapes.PpHere is a summary of the tilde escapes,which are used when composing messages to performspecial functions.Tilde escapes are only recognized at the beginningof lines.The name.Dq Em tilde\ escapeis somewhat of a misnomer since the actual escape character can be setby the option.Ic escape ..Bl -tag -width Ds.It Ic \&~! Ns Ar commandExecute the indicated shell command, then return to the message..It Ic \&~b Ns Ar name ...Add the given names to the list of carbon copy recipients but do not makethe names visible in the Cc: line ("blind" carbon copy)..It Ic \&~c Ns Ar name ...Add the given names to the list of carbon copy recipients..It Ic \&~dRead the file.Dq Pa dead.letterfrom your home directory into the message..It Ic \&~eInvoke the text editor on the message collected so far.After theediting session is finished, you may continue appending text to themessage..It Ic \&~f Ns Ar messagesRead the named messages into the message being sent.If no messages are specified, read in the current message.Message headers currently being ignored (by the.Ic ignoreor.Ic retaincommand) are not included..It Ic \&~F Ns Ar messagesIdentical to.Ic \&~f ,except all message headers are included..It Ic \&~hEdit the message header fields by typing each one in turn and allowingthe user to append text to the end or modify the field by using thecurrent terminal erase and kill characters..It Ic \&~m Ns Ar messagesRead the named messages into the message being sent, indented by atab or by the value of.Ar indentprefix .If no messages are specified,read the current message.Message headers currently being ignored (by the.Ic ignoreor.Ic retaincommand) are not included..It Ic \&~M Ns Ar messagesIdentical to.Ic \&~m ,except all message headers are included..It Ic \&~pPrint out the message collected so far, prefaced by the message headerfields..It Ic \&~qAbort the message being sent, copying the message to.Dq Pa dead.letterin your home directory if.Ic saveis set..It Ic \&~r Ns Ar filenameRead the named file into the message..It Ic \&~s Ns Ar stringCause the named string to become the current subject field..It Ic \&~\&t Ns Ar name ...Add the given names to the direct recipient list..It Ic \&~\&vInvoke an alternate editor (defined by the.Ev VISUALoption) on themessage collected so far.Usually, the alternate editor will be ascreen editor.After you quit the editor, you may resume appendingtext to the end of your message..It Ic \&~w Ns Ar filenameWrite the message onto the named file..It Ic \&~\&| Ns Ar commandPipe the message through the command as a filter.If the command givesno output or terminates abnormally, retain the original text of themessage.The command.Xr fmt 1is often used as.Ic commandto rejustify the message..It Ic \&~: Ns Ar mail-commandExecute the given mail command.Not all commands, however, are allowed..It Ic \&~~ Ns Ar stringInsert the string of text in the message prefaced by a single ~.Ifyou have changed the escape character, then you should doublethat character in order to send it..El.Ss Mail OptionsOptions are controlled via.Ic setand.Ic unsetcommands.Options may be either binary, in which case it is onlysignificant to see whether they are set or not; or string, in whichcase the actual value is of interest.The binary options include the following:.Bl -tag -width append.It Ar appendCauses messages saved in.Ar mboxto be appended to the end rather than prepended.This should always be set (perhaps in.Pa /usr/share/misc/Mail.rc ) ..It Ar askCauses.Nm mailto prompt you for the subject of each message you send.Ifyou respond with simply a newline, no subject field will be sent..It Ar askccCauses you to be prompted for additional carbon copy recipients at theend of each message.Responding with a newline indicates yoursatisfaction with the current list..It Ar autoprintCauses the.Ic deletecommand to behave like.Ic dp\- thus, after deleting a message, the next one will be typedautomatically..It Ar debugSetting the binary option.Ar debugis the same as specifying.Fl don the command line and causes.Nm mailto output all sorts of information useful for debugging.Nm mail ..It Ar dotThe binary option.Ar dotcauses.Nm mailto interpret a period alone on a line as the terminatorof a message you are sending..It Ar holdThis option is used to hold messages in the system mailboxby default..It Ar ignoreCauses interrupt signals from your terminal to be ignored and echoed as@'s..It Ar ignoreeofAn option related to.Ar dotis.Ar ignoreeofwhich makes.Nm mailrefuse to accept a control-d as the end of a message..Ar Ignoreeofalso applies to.Nm mailcommand mode..It Ar metooUsually, when a group is expanded that contains the sender, the senderis removed from the expansion.Setting this option causes the senderto be included in the group..It Ar noheaderSetting the option.Ar noheaderis the same as giving the.Fl Nflag on the command line..It Ar nosaveNormally, when you abort a message with two.Tn RUBOUT(erase or delete).Nm mailcopies the partial letter to the file.Dq Pa dead.letterin your home directory.Setting the binary option.Ar nosaveprevents this..It Ar ReplyallReverses the sense of.Ic replyand.Ic Replycommands..It Ar quietSuppresses the printing of the version when first invoked..It Ar searchheadersIf this option is set, then a message-list specifier in the form ``/x:y''will expand to all messages containing the substring ``y'' in the headerfield ``x''. The string search is case insensitive..It Ar verboseSetting the option.Ar verboseis the same as using the.Fl vflag on the command line.When mail runs in verbose mode,the actual delivery of messages is displayed on the user'sterminal..El.Ss Option String Values.Bl -tag -width Va.It Ev EDITORPathname of the text editor to use in the.Ic editcommand and.Ic \&~eescape.If not defined, then a default editor is used..It Ev LISTERPathname of the directory lister to use in the.Ic folderscommand.Default is.Pa /bin/ls ..It Ev PAGERPathname of the program to use in the.Ic morecommand or when.Ic crtvariable is set.The default paginator.Xr more 1is used if this option is not defined..It Ev SHELLPathname of the shell to use in the.Ic \&!command and the.Ic \&~!escape.A default shell is used if this option isnot defined..It Ev VISUALPathname of the text editor to use in the.Ic visualcommand and.Ic \&~vescape..It Va crtThe valued option.Va crtis used as a threshold to determine how long a message mustbe before.Ev PAGERis used to read it.If.Va crtis set without a value,then the height of the terminal screen stored in the systemis used to compute the threshold (see.Xr stty 1 ) ..It Ar escapeIf defined, the first character of this option gives the character touse in the place of ~ to denote escapes..It Ar folderThe name of the directory to use for storing folders ofmessages.If this name begins with a `/',.Nm mailconsiders it to be an absolute pathname; otherwise, thefolder directory is found relative to your home directory..It Ev MBOXThe name of the.Ar mboxfile.It can be the name of a folder.The default is.Dq Li mboxin the user's home directory..It Ar recordIf defined, gives the pathname of the file used to record all outgoingmail.If not defined, then outgoing mail is not so saved..It Ar indentprefixString used by the ``~m'' tilde escape for indenting messages, in place ofthe normal tab character (^I).Be sure to quote the value if it containsspaces or tabs..It Ar toplinesIf defined, gives the number of lines of a message to be printed outwith the.Ic topcommand; normally, the first five lines are printed..El.Sh ENVIRONMENT.Nm Mailutilizes the.Ev HOMEand.Ev USERenvironment variables..Sh FILES.Bl -tag -width /usr/share/misc/Mail.help* -compact.It Pa /var/spool/mail/*Post office..It ~/mboxUser's old mail..It ~/.mailrcFile giving initial mail commands..It Pa /tmp/R*Temporary files..It Pa /usr/share/misc/Mail.help*Help files..It Pa /usr/share/misc/Mail.rcSystem initialization file..El.Sh SEE ALSO.Xr fmt 1 ,.Xr newaliases 1 ,.Xr vacation 1 ,.Xr aliases 5 ,.Xr mailaddr 7 ,.Xr sendmail 8and.Rs.%T "The Mail Reference Manual" ..Re.Sh HISTORYA.Nm mailcommandappeared in.At v6 .This man page is derived from.%T "The Mail Reference Manual"originally written by Kurt Shoens..Sh BUGSThere are some flags that are not documented here.Most arenot useful to the general user..PpUsually,.Nm mailis just a link to.Nm Mail ,which can be confusing.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -