Find all files (-type f) that have been modified (-mtime -1) in the last 24 hours and execute the command (exec) to replace (sed -i) the string "string" with "anotherstring" (s/string/anotherstring/g) for each file found ({} \;).
find ~ -type f -mtime -1 -exec sed -i 's/string/anotherstring/g' {} \;