I have a shell script scheduled in cron job to run at every 1 minute which transfers files to remote machine and then move the files to backup folder.
Now the problem is it transfers the file to remote machine incompletely, but it has the completed file in backup folder.
So I wanted to know how it comes to the last command before completing the file transfer. Please assist.
Code:
cd /u01/app/ftp_tmp
sftp user@hostname <<-EOF
cd /home/user/ftp
mput *
bye
EOF
mv /u01/app/ftp_tmp/* /u01/app/ftp_bkp
So I wanted to know how it comes to the last command before completing the file transfer. Please assist.