Hello all! I've looked all over the internet and this site and have come up a loss with an easy way to make a bash script to do what I want to do. I have a file with a naming convention as follows:
2012-01-18 string of words here 123.jpg
2012-01-18 string of words here 1234.jpg
2012-01-18 string of words here 12345.jpg
What I am trying to do is search through all my files and folders within a directory and rename all the files so they have a five digit number instead of a three or four digit number with any empty space filled by a zero.
2012-01-18 string of words here 00123.jpg
2012-01-18 string of words here 01234.jpg
2012-01-18 string of words here 12345.jpg
As seen above, some files have three digits, some four, and some five. Is there any easy way to achieve this? I've been using the find command along with rename traversing folder by folder to change all my files into this format.
Any help would be greatly appreciated.