hi. I need help my programing friends
I need to list all the files with a certain name (for example FileName) by last modification date but only the one with the last date. If there are two files with the same name and same modification date it should print the both.
For example in this set of files:
-rw-r--r-- 13 09/23/09 15:52:38 ./aa/FileName
-rw-r--r-- 16 09/23/09 15:52:38 ./cc/cc/FileName
-rw-r--r-- 16 09/23/09 15:54:34 ./cc/FileName
-rw-r--r-- 13 09/23/09 15:54:03 ./aa/dd/FileName
-rw-r--r-- 6 09/23/09 15:54:23 ./bb/FileName
it should return:
-rw-r--r-- 13 09/23/09 15:52:38 ./aa/FileName
-rw-r--r-- 16 09/23/09 15:52:38 ./cc/cc/FileName
because they have the same name and modification date.
I have this command but it list all files it finds:
ls -tl $(find . -name FileName)
Could someone help me?
Thanks in advance.