mridul4c mridul4c - 10 months ago 66
Linux Question

How to replace a string in multiple files in linux command line

I need to replace a text in so many files in a folder, I only have

access of the server. How can I do that ? Please help.

kev kev
Answer Source
cd /path/to/your/folder
sed -i 's/foo/bar/g' *

Occurrences of "foo" will be replaced with "bar".