Linux find and replace

A simple example to replace part of a string (toto) by another (titi) inside multiples files :

find ./ -name “*.txt” -print -exec sed -i ‘s/toto/titi/g’ {} \;

Leave a Reply

Your email address will not be published. Required fields are marked *