find命令配合sed命令使用 1.查找当前目录下所有以txt文件中包含123的数字都替换成5678 find ./ -name "*.txt" -exec grep "123" {} ; -exec sed -i 's/123/5678/g' {} ;