Find all files in the directory '/path/to/dir/' and its subdirectories that contain the string 'this_is_a_text_string' and replace it with 'new_text_string' in-place.
grep -Rnl 'this_is_a_text_string' /path/to/dir/* | xargs sed -i 's/text_string/new_text_string/g'