#!/bin/bash #author:luyongjin IP=220.250.65.22 USERNAME=‘ftp_hangye20‘ PASSWORD=‘oUo2JD7oK#u-epw‘ #DATE=`date -d‘-1 day‘ +‘%Y%m%d‘` DATE=$(date +%Y%m%d) echo $DATE DIR=/tpdata/46/$DATE log_file="/tpdata/46/logs/"$DATE.log echo $log_file echo "begin##############"$DATE >> $log_file if [ -e $DIR ] ; then #ftp -n<<! /usr/bin/ftp -n<<! open $IP user $USERNAME $PASSWORD binary hash cd /data lcd $DIR prompt mput * close bye ! fi
时间: 2024-10-10 09:33:11