TechpulpQuestions
How to find files that are modified on specific date
I need to write a bash script that scans current directory and all its sub directories for files that are modified on a specific date.
It would be great if you can mention how to do the following as well.
1) Files modified on or after a specified date
2) Files modified between two dates
3) all the above cases with specified time


about 2 years ago
You can read more about “-newer” option with find command.
Files modified on or after a specified date
If you want to find all files modified on the date 22 Jan, 2011, Use the following command. Note that the difference between the dates is one day.
find . -type f -newermt 2011-01-22 ! -newermt 2011-01-23
Files modified between two dates
You can use same command described above with two different dates. The following command lists all files that are modified between 22 Jan, 2011 and 28 Jan, 2011(inclusive).
find . -type f -newermt 2011-01-22 ! -newermt 2011-01-29
Like or Dislike:
0