# I have 20000 files they are html and PHP



## mfaridi (Mar 4, 2009)

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 (Mar 4, 2009)

something like:

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


----------



## plamaiziere (Mar 4, 2009)

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
> ...



sed(1) is your friend.


----------

