【发布时间】:2014-09-28 00:01:12
【问题描述】:
跟踪 VPS 流量使用情况。
我在终端尝试了命令:
(ifconfig|grep GiB) | mail -s "Traffic Usage" -t test@ahxxm.com -aFrom:ahxxm@ahxxm.com
它成功发送了 RX&TX 信息。
但是当添加到 crontab 中时:
0 5 * * * (ifconfig|grep GiB) | mail -s "Traffic Usage" -t test@ahxxm.com -aFrom:ahxxm@ahxxm.com
发送 grep 结果失败,而是发送空白邮件。
【问题讨论】: