backup.sh 245 B

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