I run the following command to find and replace an old web address to a new one.
find . -type f -print0 | xargs -0 sed -i \
's/http:\/\/www\.oldwebaddress\.com\/techblog/https:\/\/github\.com\/myname/g'
However I get the following error.
sed: 1: "./.DS_Store": invalid command code .
I tried this one after reading some of Stack Overflow posts but didn't work either.
find . -type f -print0 | xargs -0 sed -i "" \
's/http:\/\/www\.oldwebaddress\.com\/techblog/https:\/\/github\.com\/myname/g'
sed: RE error: illegal byte sequence
What am I doing wrong here?