title: Shell script to delete files older than x days on ftp server
body: <p>Have a shell script which connects and puts files to ftp server.
  Now trying to delete 2 days older files from the same dir on ftp server.
  Tried to use the find command, but getting ?invalid command
  find ./*.txt -mtime +2 -exec rm {} \;</p>
  
  <pre><code>......
  ftp -nv &lt;&lt;! &gt;&gt; $FTP_LOG 2&gt;&gt; $FTP_LOG
  
  open xxx
  user userid pwd
  
  lcd $FILES_DIR
  
  cd /yyy
  
  put $File1 $File1
  put $File2 $File2
  
  find ./*.txt -mtime +2 -exec rm {} \;
  
  quit
  !
  ......
  </code></pre>
  
  <p>what else can I try?? Need help with this.</p>