This question is related to How to search and replace using grep Using grep and sed to find and replace a string
However, these were ambiguous as to if they searched for the string inside the files, or just their file names.
I would like to be able to search all files on the system (searching from the root directory, going into all subdirectories) for a specific string inside them (it's specifically an IP Address), and change it for another string (another IP Address), regardless of files names.
Thanks in advance
I've tried
find /path -type f -exec sed -i 's/oldstr/newstr/g' {} \;
Also
sed -i 's/\(.*\)substring\(.*\)/\1replace\2/'