mail command

The mail command allows you to read or send mail. If users is left blank, it allows you to read mail. If users has a value, then it allows you send mail to those users.

Syntax

The syntax for the mail command is:
mail [options] [users]

Options for reading mail

OptionDescription
-eCheck if mail exists. Exit status is 0 if mail exists and 1 if mail does not exist.
-f fileRead mail from mailbox called file.
-F namesForward mail to names.
-hDisplays messages in a window.
-iIgnore interrupts
-pDisplays all messages.
-PDisplays all messages with header lines.
-qTerminate when an interrupt occurs.
-rDisplays oldest messages first.
-UConvert uucp-type addresses to Internet format.
-vVerbose.

Options for sending mail

OptionDescription
-m typeDisplay a "Message-type:" line at the heading of the message, followed by type.
-tDisplay a "To:" line at the heading of the message with the names of the recipients.
-wSend mail to users without waiting for a remote transfer program to finish.
-FSave message in a file called the name of the first recipient.
-h nIf message has not been sent after n network connections, do not send message.
-iIgnore interrupts
-r addressaddress is the return address for mail messages.
-s subjectDisplays subject in the subject header.
-UConvert uucp-type addresses to Internet format.
-vVerbose.

Comments

Popular posts from this blog

gsutil Vs Storage Transfer Service Vs Transfer Appliance

SQL basic interview question