NcFTP批量上传

我在一个Debian框,我不能以任何方式修改。

我需要将整个目录(和子目录)的内容上传到我的服务器。

我唯一的工具是ncFTP( http://www.ncftp.com/ )。

你能帮我写一个bash脚本谁:

  • 使用指定的凭证连接到xxx.myhost.com
  • recursion地放入/ mydir / *的内容
  • 覆盖现有文件而不询问任何内容

谢谢你们!

基本上这应该做的伎俩:

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

当然你用你的信息replace用户名,密码,IP和目录:)