In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "the usage of various parameters of mail mail commands in Linux". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Type mail in linux, and the inbox is entered and a list of 20 mails is displayed.
The command prompt is "&"
Unread marked as unread message
H | headers displays the current mailing list
L | list displays a list of currently supported commands
| help displays the usage of multiple command parameters for viewing mailing lists
D delete the current message, move the pointer down. D 1-100 Delete 1st to 100th messages
F | from only displays simple information about the current message. F num displays simple information about a message
F | from num pointer moves to an email
Z displays the last 20 mailing lists when you first started your inbox
More | p | page when reading the content of the email where the current pointer is located, press the spacebar to turn the page, and press enter to move down one line
T | type | more | p | page num reads an email
N | next | {nothing} read the next email where the current pointer is located
When reading, press the space bar to turn the page, and press enter to move down one line
| v | visual current email enters plain text editing mode |
N | next | {nothing} num read an email
Top displays the header of the message in which the current pointer is located
File | folder displays information such as the file in which the system messages are located, as well as the total number of messages
X exit the mail command platform and do not save previous operations, such as deleting messages
Q exit the mail command platform and save previous operations, such as deleting messages deleted with d, and the read messages will be transferred to the mbox file in the current user's home directory. If you delete the file in mbox, it will be deleted completely.
Type mail-f mbox on the linux text command platform, and you can see the messages in the mbox in the current directory.
Cd changes the location of the current folder
When writing a letter, pressing the Ctrl+C key twice will interrupt the work and do not send the letter.
When reading the letter, press Ctrl+C once to exit the reading state.
1. The simplest example:
The code is as follows:
Mail-s test yangfang@fudan.edu.cn
The result of this command is to send an empty letter titled test to the back mailbox, which will be received if you have mta and the back mailbox won't block this potentially strange letter. If you don't want to be disturbed by this mess, please use a local account in the back mailbox.
two。 The second example:
Send letters in three commonly used formats
The code is as follows:
Mail-s test yangfang@fudan.edu.cn # the first method, you can use the current shell as an editor, and the Ctrl-D ends after editing the content
Echo "mail content" | mail-s test yangfang@fudan.edu.cn # the second way, I use it the most, probably because I like pipes.
Mail-s test yangfang@fudan.edu.cn < file # the third method is to send a message based on the content of file
In fact, you can easily find that mail reads the contents of the file from standard input and sends letters, and I just want you to know that, and this ends with the second example.
3. The third example, mail with attachments
If you do not have the uuencode command on your system, please install sharutils (yum install sharutils) first
Uuencode needs two parameters, the first is the file you want to send, of course, this can also be done with pipes, and the second is the file name displayed.
The code is as follows:
Uuencode / home/yfang/a.gif a.gif | mail-s pictest yangfang@fudan.edu.cn
Tar czf-/ home/yfang/ | uuencode home.tgz | mail-s pictest yangfang@fudan.edu.cn
This is the end of the introduction to "the use of various parameters of the mail mail command in Linux". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.