How to use the linux command to find the files by the modified dates or created dates or accessed date? Three types of dates can be used for command `find`: modified dates, access dates and created dates. You can specify the units as below:

  • s — second
  • m — minute
  • h — hour
  • d — day
  • w — week

Modified Dates (mtime)

To find the files which are modified within last 60 days:

[root@myserver ~]# find . -mtime -60

To find the files which are modified within last 1.5 hour:

[root@myserver ~]# find . -mmin -90

Access Dates (atime)

To find the files which are accessed within last 60 days:

[root@myserver ~]# find . -atime -60

To find the files which are accessed within last 1.5 hour:

[root@myserver ~]# find . -amin -90

Created Dates (ctime)

To find the files which are created within last 60 days:

[root@myserver ~]# find . -ctime -60

To find the files which are created within last 1.5 hour

[root@myserver ~]# find . -cmin -90

If your system is unfortunately hacked, you can use it to find the hacked files (sometimes the hacked files are created or modified).

If you have finished the system development and are ready to deploy it to production, you can use it fo list all updated or created files. Of course it is just a simple and quick way. It is more professional to use source control tools.