There may be a number of reasons why one would want to run a check to find the list of files that are modified over a Linux server directory during a certain time frame – like, your server is running low on space because someone’s been uploading large files to the system, your developer has made certain changes without informing you about the files that were modified and for what reason. There may be a 101 reasons why you might find the need to trace the files that have been modified.
So, here’s a way by which one can know.
Step 1: Go to the directory that you want the files to be traced, by using the below command:
[root@data ~]# cd /home/username/public_html
Step 2: Using the following command would give you the files recursively that have been modified in the past x days.
[root@data ~]# find . -mtime –x
Note: Change ‘x’ to the number of days you want the directory to be checked for.
If you also wish to check the time when the file was modified, use:
[root@data ~]# find . -ctime –x
But, if you wish to set a range – like a few days ago, but within ‘x’ number of days, use:
[root@data ~]# find . -ctime +1 -a -ctime -3