mridul4c mridul4c - 2 months ago 7
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

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

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

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

Comments