ftp upload example


/ Published in: Bash
Save to your folder(s)

simple ftp upload example


Copy this code and paste it in your HTML
  1. /***************************
  2. * upload_file.sh *
  3. **************************/
  4. //upload
  5. #!/bin/sh
  6. HOST='yourhostftp.users.qwest.net'
  7. USER='yourid'
  8. PASSWD='yourpw'
  9. FILE='error.log'
  10. ftp -n $HOST <<END_SCRIPT
  11. quote USER $USER
  12. quote PASS $PASSWD
  13. put $FILE
  14. bye
  15. END_SCRIPT
  16. exit 0

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.