|
小弟unix知道的不是很多。最近要写一个脚本,目的是让他每天某一时可自动运行把一个记录文件清空。脚本是这样写的。
#######################
#AutoDel
rm data.txt
cp datazero.txt data.txt
chmod 777 data.txt
at -m 8:00 + 1 days < AutoDel
########################
请问是不是就可以直接用./AutoDel执行了?
为什么我执行之后会出现:
Subject: Couldn't run your "at" job
Content-Length: 96
can't stat home dir.
Commands will not be executed.
The error was "No such file or directory"
这样的提示邮件。而且效果似乎不是正确的。
请高手指点一下。先谢了! |
|