I need to rename *-dev.example.com.cfg to *-prod.example.com.cfg
For example, if the filename is db-dev.example.com.cfg I need to rename it db-prod.example.com.cfg
There are like a 200+ files, is there a way to do it via command line ?
You can do this in pure bash with parameter substitution.
for file in *-dev.example.com.cfg; do
mv "$file" "${file/%-dev.example.com.cfg/-prod.example.com.cfg}"
done
zsh has zmv, that might be handy if doing such things regularly http://zshwiki.org/home/builtin/functions/zmv
renameinstalled?