Command to list current day files only

Hi All,
can anyone pls share the command to list the files of current day only. i want to check if there are any files in a particular directory which are not of current date.

Can u show the input and expected output??

all the files created on the same day only should be there in the output list

It is easy to try, if the sample results are posted.. Any way, have u tried with "grep" command???

In my PC, time zone is "Jun 27 2011"

ls -lrt | grep -i "Jun 27 2011"

Lists todays files....

1 Like

For last 24 hours:

find .  -mtime -1 -print

For today (GNU find):

find . -daystart -mtime -1 -print

grep -i worked for me too. Thanks divya..

you can try this also
this one is better

ls -lrt | grep `date +%Y'-'%m'-'%d`