Today I took a large number of photographs on my camera and needed to renumber them as well as rename them in linux.
Here is how I did it, and I hope you find it useful.
My filenames are of the format DSC_nnnn.JPG, where nnnn is a zero padded number in the range 0001 to 9999, for example DSC_1234.JPG
I wish to change them to park_images_mmmm.jpg, where mmmm is a zero padded number in the range 0001 to 9999 that does not necessarily tally with the nnnn from the above filename, for example DSC_1234.JPG could be renamed to park_images_0001.jpg.
Note that I use bash expansion to select a range of files that may not be sequential
Open up a terminal and chdir to the directory the images are in
Type the following onto one line, making your own changes as needed
for i in DSC_039?.JPG DSC_0*JPG
mv -v $i park_images_`printf “%04d”.jpg $a`