Linux - Find latest file in a directory
Feb 26, 2009, 06:02 (2 Talkback[s])
[ Thanks to Jadu
Saikia for this link. ]
"The intention is to print the last field of the last
line (except the dir old) from the "ls -lrt" output in that
directory.
"$ ls -lrt | awk '/nmn_log/ { f=$NF };END{ print f }'
nmn_log.23239.txt"
Complete Story
Related Stories:

