Assume that you want to find in your linux system the files that have been changed during a time period from now to the past. You can run the following command

find . -mtime 250

With this command you will have a list of modified files in the last 250 days. Below you can see more examples

-mtime +60 means you are looking for a file modified 60 days ago.
-mtime -60 means less than 60 days.
-mtime 60 If you skip + or – it means exactly 60 days.

Then if you want to format the output and order the results by the date you can run this

find . -mtime -250 -exec stat --format '%Y :%y %n' "{}" \; | sort -nr

By admin