Recursive sed in specific files

I want to change each "eviction" pattern to "128" in all files starting with "tor *". I use

find . -name "tor*" -exec sed "s/evictions/128/g" '{}' \;

But that will not work.

+5
source share
1 answer

You need the -i flag, which edits files in place.

Do it:

find . -name "tor*" -exec sed -i "s/evictions/128/g" '{}' \;

+7
source

All Articles