Find all files in  /mydir  and replace every occurrences of <string1> with <string2> in those files invoking sed as few times as possible
find /mydir -type f -exec sed -i 's/<string1>/<string2>/g' {} +