search and replace string recursively in directories

text1 -> text2 from current dirctory and sub-directories:

find ./ -type f | xargs sed -i 's/text1/text2/g'

 

This entry was posted in Uncategorized. Bookmark the permalink.