I am trying to replace on any file in a directory a specific word but this doesn't work
find . -type f -print0 | xargs -0 sed -i 's/oldWord/NewWord/g'
Subsequently I would also like to change the names of few files, but still this doesn't work
find . -exec rename 's/oldFileName/NewFileName/' {} ";"
I am using OSX terminal, any idea why?