In the following command, how can I get the file names based on its timestamp
$ grep "exit 0" a*
a1.txt:+ exit 0
a2.txt:+ exit 0
a3.txt:+ exit 0
a4.txt:+ exit 0
a5.txt:+ exit 0
$ ls -latr
-rw-r--r-- 1 user grp 83046 Oct 27 06:46 a5.txt
-rw-r--r-- 1 user grp 68108 Oct 27 07:59 a1.txt
-rw-r--r-- 1 user grp 159792 Oct 27 12:35 a2.txt
-rw-r--r-- 1 user grp 225703 Oct 27 16:41 a3.txt
-rw-r--r-- 1 user grp 246782 Oct 27 20:17 a4.txt
As you see the above output, I am not getting the output based on the timestamp the file was created. Is there any way to achieve it?