I have 20000 files they are html and PHP

mfaridi

Aspiring Daemon

Reaction score: 15
Messages: 713

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

Son of Beastie

Reaction score: 1,162
Messages: 2,755

something like:
Code:
# find /dir/with/your/files -type f -exec sed -i s/mfaridi.com/mfaridi.org/g {} ';'
 

plamaiziere

Active Member

Reaction score: 40
Messages: 184

mfaridi said:
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.
 
Top