I have a lot of files that I'm trying to rename, I tried to make a regular expression to match them, but even that I'm stuck in the files, they are called:
File name 01
File Name 100
File name 02
File name 03
etc., I would like to add “0” (zero) after any file that is less than 100, for example:
File name 001
File Name 100
File name 002
File name 003
The closest I came across matched them using this method find -type d | sort -r | grep '[1-9] [0-9] $', however I could not figure out how to replace them. Thanks in advance for any help you can offer me. Im on CentOS, if that helps, all this is done via SSH.