![]() ![]() t – reference is interpreted directly as a time.m – The modification time of the file reference.c – The inode status change time of reference.B – The birth time of the file reference. ![]() a – The access time of the file reference.The letters X and Y can be any of the following letters: $ find /dir/ -type f -newerXY 'yyyy-mm-dd' -ls $ find /dir/ -type f -newerXY 'yyyy-mm-dd' Say hello to -newerXY option for find command 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. $ find /etc/ -type f -ls |grep '25 Sep' find Command Example You need to use the grep command/ egrep command to filter out info:Ī better and recommended solution is the find command: rw-r-r- 1 root root 703 nfĭrwxr-xr-x 2 root root 4096 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
0 Comments
Leave a Reply. |