find . -type f -print | xargs stat -qf "%m%t%SN" {} | sort -rn | head
-1 | cut -f2-
The breakdown:
(1) do a find descending into file hierarchy starting at current
directory, for regular files, and print their names;
(2) do a stat on filenames piped via stdin using format of
modification time, tab, filename;
(3) sort piped stdin in reverse numerical order; (most recent first)
(4) list first 1 records piped from stdin;
(5) strip off the modification time field added in step (2) on data
piped via stdin;
and print result - the name of the file with the most recent
modification time.
Nice. Three minor tweaks:
1. use find -print0 and xargs -0; otherwise it will break for
file/folder names with spaces in them.
2. no {} on the xargs line; that just gets passed literally.
3. the OP wanted the newest modification time, not the associated
filename; that lets you simplify the stat format and take out the cut.
That results in this:
find ${start} -type f -print0 | xargs -0 stat -qf %m | sort -rn | head -1
Another good candidate for the efficiency test - the other solutions
just look for the max value without doing a full sort, and so in
general require fewer comparisons, but as a C program sort is darn
fast...