Switched off of a remote mysql server and need to search the server

WebHostPro

Well-Known Member
PartnerNOC
Jul 28, 2002
1,723
28
328
LA, Costa RIca
cPanel Access Level
Root Administrator
Twitter
Now that we are off of the remote mysql server some accounts might still have the remote IP in some of the scripts.

Anyone know what search command can search the home directory to see if anyone has the IP still?

I tried:

grep -r "66.111.111.111" *

But it's taking forever and hasn't shown any results.

Thanks
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
41
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
You could try the following instead, which would be a better way to not miss any possible files:

Code:
find /home -type f -print0 | xargs -0 grep -n "66.111.111.111"
No matter what command you use, a check on all files in /home is going to take awhile.
 

Elfofdark

Member
Mar 7, 2007
24
0
151
Or if you want use just grep hit:

cd /home
grep -lir "192.168.1.1" *

It will return every file that contains ip 192.168.1.1.
You can use sed to make a find and replace so you don't need edit them automatically.

It's up to you.