at folder a
at time , 6pm, i create file 6
with text abc
at folder a/b
at time , 7pm, i create file 7
with text abc
at folder a
at time , 8pm, i create file 8
with text abc
In folder a, I want to search all files with text abc
, order them by most-recently created to least- recently created. I do search by ls -hlt | grep -ir abc *
my results are
6:abc
8:abc
b/7:abc
but i want the following. How do I acheive it?
8:abc
b:\7:abc
6:abc
Update : ls -lt | grep -ir abc *
works well to return files with abc, oldest to newest, where as ``ls -lt` shows files new to old. Not sure why the grep disturbs flow