How to trace the modified files in a Linux server for a specific time duration?

There is also variety of reasons why one would need to run a check to find out the list of files that are changed over a Linux system server directory throughout an explicit time-frame – like, your server is running low on space as a result of someone’s been uploading massive files to the system, your developer has created certain changes without informing you regarding the files that were changed and for what reason. There is also a a 101 reasons why you would possibly notice the necessity to trace the files that are changed.

So, here’s the 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