How to get only files created after a date with ls?

You can use the find command to find all files that have been modified after a certain number of days.

For example, to find all files in the current directory that have been modified since yesterday (24 hours ago) use:

find . -maxdepth 1 -mtime -1

Note that to find files modified before 24 hours ago, you have to use -mtime +1 instead of -mtime -1.


find . -type f -newermt '1/30/2017 0:00:00'

This will find all files modified after a specific date.


ls -ltr | grep "`date | awk '{print $2" "$3}'`"

Tags:

Ls