perl -E "say+(sort{(stat$a)[9]<=>(stat$b)[9]}grep{-f}glob'*')[-1]"
L*
PS sorry.. the latest is indexed -1 not 0 which is the oldest
In reply to Re: Getting latest modified file in a directory -- oneliner
by Discipulus
in thread Getting latest modified file in a directory
by ovedpo15
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |