Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use mail command in Centos system

2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, Xiaobian will bring you about how to use mail commands in Centos system. The article is rich in content and analyzed and described from a professional perspective. After reading this article, I hope you can gain something.

1. mail basic syntax

h| headers Displays the current mailing list

l| list Displays a list of currently supported commands

?| help Show multiple commands to view mailing lists Parameters Usage

d Delete the current message, pointer and move down. d 1-100 Delete messages 1 to 100

t| type| more| p| num page Read an email

n| next| {Nothing} Read the content of the next email where the current pointer is located; when reading, press the Space key to turn the page, press the Enter key to move down one line

n| next| {Nothing} num Read an email

f| from num View header

top Displays the header of the message where the current pointer is located

file| folder displays the path and number of messages stored by the entire user

Press Ctrl+D when you are done editing the text. key end text

Q to quit

2. Mail storage location:

/var/spool/mail/username

3. Three ways to send mail:

1). Standard Input Enter Email Content:

mail -s "title" username@domain.c

Press Ctrl+D or. key end text

2). of output

echo "mail content"|mail -s "title" username@domain.c

cat somefile |mail-s "title" username@domain.c

3). File redirection method

mail -s "title" username@domain.c < file

The above is how the mail command shared by Xiaobian is used in Centos system. If you happen to have similar doubts, you may wish to refer to the above analysis for understanding. If you want to know more about it, please pay attention to the industry information channel.

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report