I always use notepad++ for this purpose. Go to search, then find in files.
It has three modes of search:
normal - just a normal search
extended (\n,\r,\t ...) - use special charcters such as line break, tab space .. etc.
Regular expression - use regular expression to find what you are looking for.
that will look at files in the current and sub directories and give you the file name and the line of text containing the text string...
Think about this a bit more, if it's s string replacement you could use sed...
sed -i 's/foo/foo_bar/g' *.php
* -i = edit the file "in-place": sed will directly modify the file if it finds anything to replace
* s = substitute the following text
* foo = the text string to be substituted
* foo_bar = the replacement string
* g = global, match all occurrences in the line
you need to be sure that the string your are searching for is unique !
Sex, Drugs & Linux Rules
Last edited by maeltar : 05-19-2010 at 05:41 PM.