I am running Ubuntu 20.04 server. It is a fully configured LEMP email and web server. In my super long process of building this, i know I entered my servers IP address on one or many of my configuration and nginx/modsecurity files. The problem is that I am changing IP addresses for the server and i dont remember all of the files that i entered my ip address into for configuration purposes. Most of these configuratin files are in random directories only accessible by root. Most files end with .conf, .bak, .txt, or something else that I cant remember.
The problem is that I am changing IP addresses, so I need to replace my old ip address in all server files with my new IP address.
My question is, what command can i use to tell ubuntu to search all strings in all files for my old IP address, and replace them with my new IP address? This would save me the trouble of going through every file manually, and also ensure that I dont make a mistake and miss a file, thus having a server with some files with my old ip address and some files with my new ip address.
I dont know grep very well but i would imagine the command would include a grep command. Any help is much appreciated.