Home> php教程> PHP开发> body text

How to find recently modified files in Linux

巴扎黑
Release: 2016-11-07 10:34:35
Original
2555 people have browsed it

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.


Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!