title: How to make ftp transfer of multiple files in directory (to remote) using find command output
body: <p>I've got to make a cron job of transfering over 100 backup <em>.tar.gz</em> files to ftp backup server. Stuck upon combining find command</p>
  
  <pre><code> find /home/backup -mtime -1 -mmin +59 -type f -name "*.tar.gz*"
  </code></pre>
  
  <p>this part works fine, and script part:</p>
  
  <pre><code>#!/bin/sh
  USERNAME="user"
  PASSWORD="password"
  SERVER="someip"
  FILE="/home/backup"
  DATE="`date +%Y-%m-%d-%H.%M.%S `"
  BACKUPDIR="/backup/${DATE}/"
  
  ftp -inv $SERVER &lt;&lt;EOF
  user $USERNAME $PASSWORD
  mkdir $BACKUPDIR
  cd $BACKUPDIR
  mput $FILE/*.tar.gz*
  quit
  EOF
  </code></pre>
  
  <p>for this </p>
  
  <pre><code>00 12 * * * find /home/backup -mtime -1 -mmin +59 -type f -name "*.tar.gz*" -exec /root/ftp.sh {} \;
  </code></pre>
  
  <p>doesn't work. No scp/ssh advice please) have to do it with ftp.</p>