I am going to rename image files and pdf files in a folder in Linux.
It should be recursively as some files are in sub-sub folder.
Current file name pattern is like:
an-yt-h-in-g-123word-123456-anything.jpg (.png .pdf)
My goal pattern is
123456-anything.jpg (.png .pdf)
In a short, I want to remove everything before -NumberString-
, and keep everything afterwards (includes the NumberString
).
Can anyone help? Thanks a lot