I have a list of files, in different folders, named like
aaaaaa_bb_cccc_ddddd_ee.jpg In some of them, I need to remove everything up to the second _, so they become
cccc_ddddd_ee.jpg In others (already in a separate folder), I need to remove everything up to the third _
ddddd_ee.jpg I know commands such as rename, which use some REGEX, but I don't know the exact expression for this case. How can I do that on Linux terminal?