image1 image2 image3

HELLO I'M FERNANDO|WELCOME TO MY PERSONAL BLOG|I LOVE TO DO CREATIVE THINGS|I'M PROFESSIONAL DEVELOPER

Batch file to connect to an FTP and put a file


Recently I needed to create a batch file to back up a file on a FTP from another machine. It was not as trivial as might be expected initially, but once you've found out is pretty easy, I put it here in case someone finds it useful.

You just have to create a file with execute permissions containing the following lines:

#!/bin/bash
ftp -n -v xxx.xxx.xxx.xxx << EOT
user username password
prompt
put filename
bye
EOT

Share this:

CONVERSATION

0 comentarios:

Post a Comment