其中xxx.xxx.xxx.xxx为IP地址
#!/bin/bash
list=`ls /opt/sftp/ `time=`date "+%Y%m%d%H%M%S"`
today=`date "+%Y%m%d"`
cfgfile="/root/shell/conf/data_backup.cfg"
logfile="/root/shell/logs/data_backup_${today}.log"
passwordfile="/root/shell/conf/data.rsync"
input_home="/opt/sftp"
ps=`ps x |grep -v grep|grep rsync_ftpdata.sh|wc -l`
if [[ $ps -le 3 ]];then
for sourcepath in $list
do
cd ${input_home}
# rsyncfile=`find ${sourcepath} -type f `
rsyncfile=`find ${sourcepath} -type f -mmin -60 -mmin +10`
if [ -n "$rsyncfile" ];then
echo $rsyncfile
for okfile in $rsyncfile
do