FTP.sh
#!/bin/bash
ftp -n <<- EOFopen <FTP Server IP地址>user < FTP用户名> <FTP密码>cd /fullbinlcd /data/fullpromptmget *closebyeEOFdel.sh
#!/bin/bash
disk=df -h|grep data|awk '{print $5}'|sed 's/.$//'
if [ "$disk" -gt "85" ];thenfind /data/diff/ -type f -mtime +15 -exec rm {} \;find /data/full/ -type f -mtime +15 -exec rm {} \;fi
使用crontab -e命令,加入定时任务
30 00 /root/del_days.sh &00 19 /root/full_download.sh &
精彩评论