Replace a string in multiple files Case sensitive: find ./ -type f -exec sed -i 's/string1/string2/g' {} \; Case insensitive: find ./ -type f -exec sed -i 's/string1/string2/gI' {} \; Occurrences of "foo" will be replaced with "bar".