FTP scripting example, without expect or named pipes


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

My particular ftp daemon automatically assumes PASV and TYPE IMAGE - which are not in this particular example. Also, for large transfers, send the HASH command before doing PUT so you can see a progress indicator if you want.


Copy this code and paste it in your HTML
  1. /bin/ftp -inv ftp.example.com <<ENDFTP
  2. user fred mypassword
  3. cd /remote/directory/mydata
  4. lcd /some/local/directory
  5. put example.txt
  6. bye
  7. ENDFTP

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.