sed -i "s/oldstring/newstring/g" `grep oldstring -rl yourdir`
例如:替换/home下所有文件中的www.bcak.com.cn为bcak.com.cn
sed -i "s/www.bcak.com.cn/bcak.com.cn/g" `grepwww.bcak.com.cn -rl /home`
sed -i "s/ray/eses/g" `grep ray -rl modules`
sed -i "s/w3school/starconnect/g"`grep w3school -rl downloaddir`
方便下载整个站点后修改
http://blog.csdn.net/kauu/article/details/1757325