Consider the code to search for all files containing the pattern search string:bash-3.2$ # The below find works fine..bash-3.2$ find . -type f -exec grep -il search string {} \;bash-3.2$ # But I am unable to redirect output to a log file..bash-3.2$ find . -type f -exec grep -il search string {} \ > log.txtfind: incomplete statementbash-3.2$From the man pages for Solaris find:-exec command   True if the executed command returns a  zero                value  as  exit  status.   The end of command                must be punctuated by an  escaped  semicolon.                A  command  argument  {}  is  replaced by the                current path name.So it seems an escaped semicolon is compulsory. Is there another way to go about this?
How do I redirect output from the find command (that uses grep) to a log file?
find;grep;solaris;io redirection
You're deleting the \;. Just do this:find . -type f -exec grep -il search string {} \; > log.txt