Search and replace strings in files
Code
grep -rli 'old-word' * | xargs -i@ sed -i 's/old-word/new-word/g' @
grep -rli 'old-word' * | xargs -i@ sed -i 's/old-word/new-word/g' @
cd yourDir
find . -type d -name "*test*" | while read f; do mv $f $(echo $f | sed 's/test/demo/'); done
find . -type f -name "*test*" | while read f; do mv $f $(echo $f | sed 's/test/demo/'); done