grep -rl 'windows' ./ | xargs sed -i 's/windows/linux/g' The example above replaces windows with linux