脚本如下:
#!/bin/sh
runtime=`date -d "1 days ago" +%Y-%m-%d`
getinfolog() {
cd /usr/local/apache2/logs/info
ftp -n FTP服务器的IP autoftp
user 帐号 密码
ascii
get info-$runtime.acces
get info-$runtime.error
quit
autoftp
}
getinfolog
然后把该脚本加入crontab中。
1473131333 于 2013-04-07 21:42:56发表:
可以吗