To-Slalom

ftpput

Apr 16th, 2021 (edited)
830
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. # Enviar Files para servidor via Bash
  4. # basic script to send files to webserver without no condition yet
  5.  
  6. usern="Nome_do_utlizador"   # user name
  7. doorn="Numero_da_port"      # door number
  8. passw="your_password"       # Password
  9. hostn="Your_host"           # ftp.hostname ou ip
  10. filen="yourfile.whatever"   # file to send
  11.  
  12. orig="/caminho/de/origem/${filen}"  # LocalPath and file name
  13. dest=${filen} # raiz do site        # Server Path or just file
  14.  
  15. ftpput -P ${doorn} -u ${usern} -p ${passw} ${hostn}  ${dest}  ${orig}
  16.  
  17. read -p "Press [Enter] to continue ..."
RAW Paste Data