delete the swap file centos code example
Example 1: find and replace in all files in directory centos
grep -rl 'apples' /dir_to_search_under | xargs sed -i 's/apples/oranges/g'
Example 2: ubuntu find file with text
grep -r someWordToSearchHere *