对象为整个目录以及子目录
1 | grep -rl 'windows' ./path | xargs sed -i 's/windows/linux/g' |
因为网址有有//,可能需要转录一直不成功,分两部分替换就可以了
1 | grep -rl 'www.caotama.com' ./wwwroot | xargs sed -i 's/www.caotama.com/www.cao.com/g' |
1 | grep -rl 'https' ./wwwroot | xargs sed -i 's/https/http/g' |