PDA

View Full Version : I have 20000 files they are html and PHP


mfaridi
March 4th, 2009, 07:40
I have over 20000 files , all of them are HTML and PHP , I have this word in many of them
"mfaridi.com" and I do not know how many of them
I want change "mfaridi.com" to "mfaridi.org"
How I can do this with shell and script

I want find all of "mfaridi.com" and change them to "mfaridi.org" in 20000 files

vermaden
March 4th, 2009, 09:25
something like:
# find /dir/with/your/files -type f -exec sed -i s/mfaridi.com/mfaridi.org/g {} ';'

plamaiziere
March 4th, 2009, 09:31
I have over 20000 files , all of them are HTML and PHP , I have this word in many of them
"mfaridi.com" and I do not know how many of them
I want change "mfaridi.com" to "mfaridi.org"
How I can do this with shell and script

I want find all of "mfaridi.com" and change them to "mfaridi.org" in 20000 files

sed(1) is your friend.