List the latest file from multiple sub-directoriesA helpful user left an answer but deleted it before I could accept. The following command gave me the output that I needed: find n512/ -type d | while read d; do ls -ltr $d/hydro* | tail -n 1; done |awk -F " " '{print $8}' >out.txt