These commands will replace all instances of ‘foo’ with ‘bar’ in all files in the current working directory and any sub-directories.
Current Directory:
sed -i s/foo/bar/g *
Recursively:
find * -type f -exec sed -i s/foo/bar/g {} \;
Current Directory:
sed -i s/foo/bar/g *
Recursively:
find * -type f -exec sed -i s/foo/bar/g {} \;