How to multiple rename with bash

Sorry the wiseman, I can't remember that guy who post this knowledge. ( he 's alway great ). 

In your command line ( bash ) do

$ for file_name in *.; do mv $file_name ${file_name//}; done;

for example

$ for f in *.sql; do mv $f ${f/.sql/.dump}; done;

Then every sql files in your current folder will be .dump files hahaha :)

Comments

Popular posts from this blog

Difference between apt-get update and apt-get dis-upgrade