Could anyone know how to use the unix GREP/FIND to find a string in all the files and directories(including subdirectories and files)
there are some hardcoded IP's at the server level, so i need to find the string in all the files, starting from root.
any ideas ????
thanx in advance..
sravan
11-08-2000, 02:17 AM
denevge
use
find / -type f -exec grep -l "IP" {} \;
why ?
find / -type f -> find all files starting from /
find .... -exec -> for each item found, do the following command. Where you normally place the filename in you command, put {} .
grep -l "IP" something -> returns the filename if string "IP" is found in file something