在 linux 下 取代某字串在所有檔案

下面的例子是 取代所有 php 檔案 內的 foo 更改為 bar

# sed -i — ‘s/foo/bar/g’ *.php