I need to look for the string "Total CPU time used" in a set of files that are generated in an iterative calculation within a great number of subfolders called folder_A, folder_B, folder_C and so on.
So in folder_A i would have
file_1_1
 file_1_2
 file_1_3
 file_1_4
 file_1_5
 file_2_1
 file_2_2
 file_2_3
next to some other files with different names. In folder_B there would be
file_1_1
 file_1_2
 file_1_3
 file_1_4
 file_1_5
 file_2_1
 file_2_2
 file_2_3
 file_2_4
 file_2_5
 file_3_1
and so on, so every subfolder would contain a different amount of iterative steps and thus a different number appending the last file. I think the way to go is using recursive grep sorting out the alphabetically last file, the code I've tried is:
grep -r "Total CPU time used" */file_* | tail -1
However this only gives me an output of the last file in the last directory folder_Z. How do I grep the string from all subdirectories so that folder_A/file_2_3, folder_B/file_3_1 and so on are not skipped?

forloop... if it works, then yes that's what I need.file_1_10will sort beforefile_1_2? Do you want the last one in lexicographical order (e.g.file_1_2)or do you want the last one as in "sorted by version" (file_1_10) ?file_1_5and resumes withfile_2_1, so this should be no problem. But what I need would befile_1_10.