I need to use a find command in a script with ssh and find together. Something like this:
expect -c "
    spawn ssh user@host \"find api -type f -name *.html -mtime +30 -exec rm -rf {} \;\"
    expect {
        \"*password\" {set timeout 300; send \"mypassword\r\";}
          }
    expect eof"
And I get
find: missing argument to `-exec'
Any thoughts on what may be causing this or how I can fix it ? Thx
 
    