-->
Previous | Table of Contents | Next |
When you type the command to start your e-mail program, you see a ? prompt. The mail program tells you to type ? for help. To get a list of commands and some information about each command, type ? and press <Return>.
After you type ? and press <Return>, you see a display similar to the following:
Mail Commands t <message list> type messages n goto and type next message e <message list> edit messages f <message list> give head lines of messages d <message list> delete messages s <message list> file append messages to file u <message list> undelete messages R <message list> reply to message senders r <message list> reply to message senders and all recipients pre <message list> make messages go back to /usr/spool/mail p <message list> print message m <user list> mail to specific users q quit, saving unresolved messages in mbox x quit, do not remove system mailbox h print out active message headers ! shell escape cd [directory] chdir to directory or home if none given A <message list> consists of integers, ranges of same, or user names separated by spaces. If omitted, Mail uses the last message typed. A <user list> consists of user names or aliases separated by spaces. Aliases are defined in .mailrc in your home directory. &
This listing shows you the commands you can use from the ? prompt. Although some of these commands are explained later in this chapter, here are some things to note right now:
Youll want to save some of the e-mail you receive. Its not practical to keep all your mail in your system mailbox for these reasons:
Earlier in this chapter, you learned that the messages youve read are saved (unless you say otherwise) in the file mbox. You also know that you can read these messages by typing mail -f mbox and pressing <Return>. You can also read messages from other files by using the mail commands -f option.
There are two primary ways (with and without a header) to save the current message in a file when you use mail. With both methods, you can specify a file to hold the message, and the message is added to that file. If you dont specify a file, the message is added to the file mbox (your personal mailbox) in your home directory. If you use q to quit the mail program, the messages are removed from your system mailbox.
When you see the ? prompt, you can use any of the following methods to save a message:
TIP: To keep messages in your system mailbox rather than the mbox file after you read them, use the preserve command, pre. You can use this command with a message list.
You know that messages youve already read are automatically saved to mbox unless you use the preserve command.
Its a good idea to get in the habit of specifying a filename when you use the save command, s. If you dont specify a filename, the current message is added to the file mbox. If you include a message list but dont specify a file, mail uses the message list as the name of the file to which it saves the current message. If you use q to quit the e-mail program, the saved messages are removed from your system mailbox.
Previous | Table of Contents | Next |