Debian – NcFTP batch uploading

bashdebianftpreadynas

I'm on a Debian box, which I can't modify in any way.

I need to upload an entire directory (and subdirs) content to my server.

The only tool I've got is ncFTP (http://www.ncftp.com/).

Can you help me write a bash script who:

  • connect to xxx.myhost.com with given credentials
  • put recursively the content of /mydir/*
  • overwrite existing files without asking anything

Thank you all!

Best Answer

Basically this should do the trick:

ncftpput -R -u username-here -p "password-here" 12.12.12.12 /remote/dir /my/local/dir

Of course you replace username, password, IP and directories with your information :)