Name
Synopsis
mail [options
] [users
]
Read mail (if no users listed), or send
mail to other users. Type ?
for a summary of commands. Esoteric
debugging options exist (not listed) for system administrators.
See also mailx, and vacation in the later section "Alphabetical Summary of Solaris
Commands.”
Tip
This is the original V7 Unix mail program. On Mac OS X and GNU/Linux, mail is really mailx. See mailx.
Options for Sending Mail
-
-m
type
Print a “Message-type:” line at the heading of the letter, followed by type of message.
-
-t
Print a “To:” line at the heading of the letter, showing the names of the recipients.
-
-w
Force mail to be sent to remote users without waiting for remote transfer program to complete.
Options for Reading Mail
-
-e
Test for the existence of mail without printing it. Exit status is 0 if mail exists; otherwise 1.
-
-f
file
Read mail from alternate mailbox file.
-
-h
Display a window of messages rather than the latest message.
-
-p
Print all messages without pausing.
-
-P
Print messages with all header lines displayed.
-
-q
Terminate on an interrupt.
-
-r
Print oldest messages first.
Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.