Find all files with the extension .txt that were modified within the last day and replace the word "text" with "random" in each file.
find / -mtime -1 -type f -iname '*.txt' -exec sed -i 's/text/random/g' {} \;