Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs


Top White Papers

More on LinuxToday


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: