This days I'm migrating from domainA.com to domainB.com and I need to replace the links in so many files at time.
The best way I found to do this is this:
Find all PHP files with the "domainA.com" string inside it:
find . -name "*.php*" -type f -print0|xargs -0 grep "domainA.com" >> smaCat.log
Replace all PHP it with command:
find ./* -name "*.php*" -type f -exec sed -i 's/domainA.com/domainB.com/g' {} \;
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment