The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 12-19-2006
happyv happyv is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 209
after server disconnect ftp tranfer......

Hi,

I have a problem for ftp file to server. If the server due to some reason (such as unstable) and disconnect my ftp script. Can the ftp keep automatic retry to connect? If yes, the files can be keep sending to host without duplicate?

HOST=hostname
USER=happyv
PASSWD=happyv

exec 4>&1
ftp -nv >&4 2>&4 |&

print -p open $HOST
print -p user $USER $PASSWD
print -p cd csl
print -p binary
print -p put CDN00173.gz
print -p put CDN00174.gz
print -p put CDN0175.gz

wait
exit 0


150 Ready to receive "/CDN00174". Mode STREAM Type BINARY.
netout: Broken pipe
421 Server is going offline. Control connection closed.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.

Last edited by happyv; 12-19-2006 at 10:16 PM..