On Linux/Unix machine how do I find files modified between a certain number of days ago ? For example say between 2 and 5 days ago, not calendar dates but days ago from right now. So files modified more than 2 days ago, but not more than 5 days days ago. It would not return anything that was modified yesterday, for example.
If you want to do it on the Unix command line, try using find with the -mtime option.
Example:
find /home -iname ".c" -mtime 2 -mtime -4
will choose files modified two to four days ago.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With