On Wed, Jan 09, 2008 at 05:20:14PM -0600, Florin Iucha wrote:
> On Wed, Jan 09, 2008 at 04:57:04PM -0600, Dave Sherohman wrote:
> > Not entirely "quick" when dealing with a million files, but
> > 
> > find /some/dir/ -exec ls -l {} \; | awk '{print $6,$7,$8}' | sort -r | head -1
> 
> Ewwwww... ETOOMANYLS
> 
> find /some/dir -type f -printf "%h/%f %A@\n" | sort -rn -k2 | head -1

*bows*  Yours is the superior find-fu.  I wasn't even aware it had a
-printf option.

But wouldn't you want %T@ (mtime) rather than %A@ (atime), since we're
looking for the most recently modified file?

-- 
I reckon we are now the only monastry ever that had a dungeon stuffed with
sixteen thousand zombies.
  - perlmonks.org