Home  >  Article  >  php教程  >  How to find recently modified files in Linux

How to find recently modified files in Linux

巴扎黑
巴扎黑Original
2016-11-07 10:34:352569browse

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.


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:A usage example of JsonDBNext article:A usage example of JsonDB