Automatically send an email to shell after the linux file is uploaded.
Source: Internet
Author: User
After the linux file is uploaded, the system automatically sends an email to shell. First, the function of each directory is described as www.2cto.com # backup file storage directory/home/admin/xiaoshibak # All shell storage directories/home/admin/xiaoshi # automatic Upload + automatic shell/home/admin/xiaoshi/run. s...
After the linux file is uploaded, the system automatically sends an email to shell. First, the function of each directory is described as www.2cto.com # backup file storage directory/home/admin/xiaoshibak # All shell storage directories/home/admin/xiaoshi # automatic Upload + automatic shell/home/admin/xiaoshi/run. sh # automatically upload the file shell (the FTP Command cannot upload the directory)/home/admin/xiaoshi/wwwrootbak. sh # automatically send an email to shell/home/admin/xiaoshi/mail. sh # shell content/home/admin/xiaoshi/mail.txt www.2cto.com/home/admin/xiaoshi/run. shsh/home/admin/xiaoshi/wwwrootbak. shsh/home/admin/xiaoshi/mail. sh/home /Admin/xiaoshi/wwwrootbak. sh #! /Bin/bash ftp-n your FTP host IP address < Choose one of the above four commands .. run the following command after packaging www.2cto.com: nohup/home/admin/xiaoshi/run. after the sh & command is executed, the file will be automatically uploaded, and then you can exit SSH. after all the files are uploaded, you will receive an email prompt. If your server cannot execute the mailx command or use the mailx command cannot send mail, please refer to the following article http://www.2cto.com/ OS /201209/156623.html
Address: http://www.cnblogs.com/xiaoshi1991/archive/2012/09/20/2695645.html
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:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.