Some basic commands for manipulating messages under Linux

Source: Internet
Author: User

The system provides the communication system between the users, when the user opens the terminal registers the login to discover the system to give the following information:

The code is as follows:

You have mail.

The user can then read the letter by typing the Mail command:

The code is as follows:

$ mail

The mail program displays the user's letters one by one and displays the latest letters in chronological order. Every time a letter is displayed, Mail asks

Whether the user wants to do something with the letter. If the user answers D, the letter is deleted, and if only the ENTER key is pressed, no change is made to the letter.

Move (the letter is still kept, the next time you can read the letter); If you answer P, ask for a duplicate display of the letter. S filename says that the letter

to a named file; if you answer q, you want to exit from mail.

The code is as follows:

[Root@localhost ~]# Mail

Mail version 8.1 6/6/93. Type? For help.

"/var/spool/mail/root": Messages Unread

>u 1 root@localhost.local Mon 15:43 24/936 "Cron

U 2 root@localhost.local Mon 15:44 24/936 "Cron

U 3 root@localhost.local Mon 15:45 24/936 "Cron

U 4 root@localhost.local Mon 15:46 24/936 "Cron

U 5 root@localhost.local Mon 15:47 24/936 "Cron

> indicates that the current message U is unread

The code is as follows:

& P//Display current message

Message 1:

From Root@localhost.localdomain Mon 19 15:43:02 2009

Date:mon 2009 15:43:02 +0800

From:root@localhost.localdomain (Cron Daemon)

The code is as follows:

& 2//display of files labeled 2

Message 2:

Other common parameters:

Unread marked as unread mail

H|headers Displays the current mailing list

L|list display list of currently supported commands

?| Help displays command parameter usage for multiple view mailing lists

D Delete the current message, and move the pointer down. D 1-100 Delete 1th to 100th email

F|FROM displays only simple information about the current message. F num Display simple information about a message

F|from num pointer moves to a message

Z shows the next 20 mailing lists when you just made your inbox

More|p|page reading the contents of the current pointer, press the SPACEBAR to turn the page, press ENTER to move down one line

T|type|more|p|page Num Read an email

N|next| {Do not fill in} read the next message that contains the current pointer

When reading, press the space bar is the page, press ENTER is to move down one line

V|visual current message into plain text editing mode

N|next| {Nothing to fill} num read an email

Top displays the message headers for the message that contains the current pointer

File|folder displays information about the file where the system message resides and the total number of messages

X exits the Mail command platform and does not save previous actions, such as deleting messages

Q Exit Mail command platform, save previous operations, such as delete messages that have been deleted with D, and the read messages will be transferred to the current user's home account

Recorded in the Mbox file. If you delete a file in mbox, it will be deleted completely.

When you enter Mail-f mbox on the Linux text command platform, you can see the messages in the mbox in the current directory.

CD changes the location of the current folder

When writing a letter, press CTRL + two times to interrupt the work and not send the letter.

When reading a letter, press CTRL + C to exit the reading status.

Check to see if the e-mail message is sent or stranded in the mail server


The code is as follows:


If the screen appears as "Mail queue is empty" information, Mail has been sent out.

For other error messages, the e-mail message has not been sent.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.