The letters X and Y can be any of the following letters: Say hello to -newerXY option for find commandįind /dir/ -type f -newerXY 'yyyy-mm-dd' -ls Gnu find as various command line option to list files by a modification and access date/time stamp. You can save list to a text file called output.txt as follows:įind /data/images -type f -newer /tmp/start -not -newer /tmp/end > output.txt Linux find file by date using the date command In this example find files modified between Jan/1/2007 and Jan/1/2008, in /data/images directory:įind /data /images -type f -newer /tmp /start -not -newer /tmp /end If you need a specific date range many days ago, than consider using the find command. You need to use the grep command/ egrep command to filter out info:Ī better and recommended solution is the find command:įind /etc/ -type f -ls |grep '25 Sep' find Command Example rw-r-r- 1 root root 703 nfĭrwxr-xr-x 2 root root 4096
![find files by date range find files by date range](https://www.syncfusion.com/products/aspnet/control/images/ejdaterangepicker/formatting.png)
![find files by date range find files by date range](https://www.howtogeek.com/thumbcache/120/80/474bc3e7deba5c62710519961161f6d0/wp-content/uploads/2014/07/learningwindowssearch.jpg)
rw-r-r- 1 root root 477 zsh_command_not_found Drwxr-xr-x 2 root root 4096 Sep 24 11: 42 sysctl.dĭrwxr-xr-x 2 root root 4096 Sep 24 11: 42 logrotate.dĭrwxr-xr-x 2 root root 4096 Sep 24 11: 42 initĭrwxr-xr-x 2 root root 4096 Sep 24 11: 42 init.dĭrwxr-xr-x 2 root root 4096 Sep 24 11: 42 dnsmasq.d-availableĭrwxr-xr-x 2 root root 4096 Sep 23 06: 22 bash_completion.d