This will replace all occurrences of "text1" into "text2" of all text files within all multiple sub level folders in current folder.
$ find ./ -type f | xargs sed -i ‘s/text1/text2/g’
f meant for text files
-i option for replace the strings in the txt files and overwrite it.
‘s/text1/text2/g’ in this option,
s -> string,
text1 -> old string
text2 -> new string
g -> global, this is essential if we need to replace all the occurrences in the same input file.