How to find recently modified files in Linux
If there is any problem with the website or server, the first thing you will think about is whether the files on the server have been modified, and the find command will be used to search, as follows :
Search the .php files in the current directory for files that have been modified in the last 30 minutes.
find . -name ‘*.php’ -type f -mmin -30
Find the details of files modified in the last 30 minutes in the .html file in the current directory.
find . -name ‘*.html’ -type f -mmin -30 -ls
Find regular files in the current directory that have been modified in the last day.
find . -type f -mtime -1
Find regular files in the current directory that were modified last 1 day ago (within 2 days).
find . -type f -mtime +1
If you want to find modifications to the files in the /home directory, just cd /home and then run the search, so that if you encounter a problem, it will be easy to troubleshoot the problem.