you have two choices I suggest you can write a python script to rename each file first you split()
function to split the underscore and extract the number the question is not that clear
Rename multiple files in a directory in Python
there is already an answer here also
Or you can use the mv
command to rename mv <old name> <new name>
and write a bash script to rename each one you can use sed
or awk
to rename each file
you can chain command for example ls -la | awk you can use for loop to iterate ls -l below is the guide to shell scripting
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-7.html
there is already an answer here
BASH: Rename multiple files. But only rename part of the filename
I hope this is a good starting point to you