mailx.1 (2010 09)

m
mailx(1) mailx(1)
$ The last message.
* All messages.
n
-m An inclusive range of message numbers, n through m, where n is less than m.
user All messages from user.
/string All messages with string in the subject line (uppercase-lowercase differences are ignored).
:c All messages of type c, where c is one of:
d deleted messages
n new messages
o old messages
r read messages
u unread messages
Note that the context of the command determines whether this type of message
specification makes sense.
Other arguments are usually arbitrary strings whose usage depends on the command involved.
File names, where expected, are expanded using normal shell conventions (see sh(1)). Special characters
are recognized by certain commands, and are documented with the commands below.
At start-up time,
mailx reads commands from a system-wide file (/usr/share/lib/mailx.rc
)to
initialize certain parameters, then from a private start-up file (
$HOME/.mailrc
) for personalized vari-
ables. Most regular commands are legal inside start-up files, the most common use being to set up initial
display options and alias lists. The following commands are not legal in the start-up file:
!, Copy, edit,
followup, Followup, hold, mail, preserve, reply, Reply, shell, and
visual. Any errors in the start-up file
cause the remaining lines in the file to be ignored.
COMMANDS
The following is a complete list of
mailx commands:
! command Escape to the shell. See the description of the SHELL environment variable below.
# comment Null command (comment). Useful in .mailrc files.
= Print the current message number.
? Print a summary of commands.
newline Advance to next message and
print. If this is the first command entered, the first
unread message is printed. (To read the current message, use print.)
alias alias name...
group alias name... Declare an alias for the given names. The names are substituted when alias is used
as a recipient. Useful in the
.mailrc file.
alternates name... Declares a list of alternate names for your login. When responding to a message,
these names are removed from the list of recipients for the response. With no argu-
ments, alternates prints the current list of alternate names. See also allnet in
the Environment Variables subsection.
cd [directory]
chdir [directory] Change directory. If directory is not specified, $HOME is used.
copy [filename]
copy [msglist] filename
Copy messages to the file without marking the messages as saved. Otherwise
equivalent to the save command.
Copy [msglist] 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 equivalent
to the Save command.
delete [msglist] Delete messages from the mailbox .Ifautoprint is set, the next message after
the last one deleted is printed (see the Environment Variables subsection). See also
dp.
discard [header-field ...]
HP-UX 11i Version 3: September 2010 3 Hewlett-Packard Company 3