I need to rename all files with .js extension, but names of files can vary, for example:rootDirectory--firstDirectory----first.js--secondFileDirectory----second.js--thirdDirectory----third.jsNeeds to be renamed torootDirectory--firstDirectory----newName.js--secondFileDirectory----newName.js--thirdDirectory----newName.jsIs there a way to do it?I'm using Ubuntu 14.04 
Rename all files with the same extension and any name
rename
Ububtu 14 has a version of find that has the -execdir option, so this becomes relatively simple:find . -name '*.js' -execdir mv -i {} newName.js \;For example, I have this tree:./A./A/first.js./B./B/second.jsI run the command$ find . -name '*.js' -execdir mv -i {} newName.js \;The resulting tree:./A./A/newName.js./B./B/newName.js