testftp.sh 239 B

1234567891011121314151617
  1. #!/bin/sh
  2. HOST=192.168.50.108
  3. USER=backupftp
  4. PASSWD=0000
  5. FILE=ub1.log
  6. ftp -v -n $HOST <<END_SCRIPT
  7. user $USER $PASSWD
  8. binary
  9. hash
  10. cd /files
  11. lcd /home/gs1801/wolf/testftp/
  12. prompt
  13. put $FILE
  14. bye
  15. END_SCRIPT
  16. echo "commit to ftp successfully"