1

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!

Fabio B.
  • 299
  • 2
  • 5
  • 17

1 Answers1

2

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 :)

Frands Hansen
  • 4,617
  • 1
  • 16
  • 29
  • Thank you! I believe this is what I've been looking for but... it hangs a few seconds then says 'Killed'. Consider that doing the same manually with ncftp works correctly. Where does it log? – Fabio B. Jun 13 '11 at 10:31
  • Sorry! My destination folder had "/" at bottom. Now it works! Thanks :) – Fabio B. Jun 13 '11 at 10:42