Sunday, May 30, 2010

how to run non-interactive ftp

##logfile="ftp.log"
##exec > $logfile 2>&1
echo 'THIS IS A TEST'
files=`find ftp* -mtime 0`
echo $files
for file in $files
do
ftp -vn peterpan <user oracle oracle
binary
pwd
mput $file
quit
EOF
done
echo 'FINISH'



peterpan here is the remote hostname with an account of oracle and password oracle.

No comments:

Post a Comment