In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "what commands are used to send emails regularly in the Linux operating system". 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!
Sometimes you need to inform others or do something yourself at a certain time. For some people who read email every day, it is safest to send an email. This is easy to do under the Linux operating system using the Linux at command with mail.
The Linux at command can run a program at a certain time, while mail can send and copy the body of the message stored in a text on the command line.
The specific usage of the Linux at command to send mail on a regular basis:
1. Get the email text ready, for example, in email.txt
two。 Then write a script, such as run.sh
#! / usr/bin/bash
Mail-s "Title here"-c Address_CC Address_To
< email.txt 3. 命令行里执行 at 0815am Jan 24 at>. / run.sh
At > ^ D
Run.sh can be executed in 8:15am, Jan 24.
However, some servers restrict the use of the at command, so there is another stupid way
Add "speep time" at the beginning of run.sh, then run run.sh directly, and then go to the background.
Time here is an integer, which means how many seconds.
However, some servers will make the user logout automatically when the terminal does not enter for a period of time, so you can make some actions such as pwd,ls in the script from time to time to prevent this situation.
This is the end of the content of "what commands do you use to send mail regularly in the Linux operating system"? thank you for your 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.