=== Replace a String in Multiple Files in Linux Using Grep and Sed #Basic Format grep -rl matchstring somedir/ | xargs sed -i 's/string1/string2/g'