Getting file Details with find -mmin

I'm new to this and I have done a lot of research and am 99% done with my ksh script BUT I need help with. The script looks at Journal files and reports back on any that have not been updated for 15 min. Everything works but I wanted more detail (added -ls) and now I'm getting dups.
Original code:

find $journdir2*.dat -mmin +15 ! \( -name "*MFN*.dat" -o -name "*Hybrid*.dat" -o -name "*FileGet*.dat" -o -name "Error*.dat" \) -exec echo {} \; > $logfile

returns :/jcap/EngineJournal/journal_09032013/From_Halfpenny_Hub_Order_09032013.dat
Code with "-ls":

find $journdir2*.dat -mmin +15 ! \( -name "*MFN*.dat" -o -name "*Hybrid*.dat" -o -name "*FileGet*.dat" -o -name "Error*.dat" \) -ls -exec echo {} \; > $logfile

Returns:
99585 460 -rw-r--r-- 1 jcap jcap 470202 Sep 3 16:40 /jcap/EngineJournal/journal_09032013/From_Halfpenny_Hub_Order_09032013.dat
/jcap/EngineJournal/journal_09032013/From_Halfpenny_Hub_Order_09032013.dat
Is it possible to elim. the dup and keep the detail with this code? Thank you

remove -exec echo {} \; from your code

1 Like

wow..A million thanks.. It worked!..