Find files changed between two dates on Linux machine

On a Linux / Unix machine, can I find files changed between a certain number of days ago? For example, say 2 to 5 days ago, not calendar dates other than days ago. Thus, the files were changed more than 2 days ago, but not more than 5 days ago. For example, it will not return anything that was changed yesterday.


source to share

1 answer

If you want to do this on the Unix command line, try using find with the -mtime option.


find /home -iname ".c" -mtime 2 -mtime -4


will select files modified two to four days ago.



All Articles