Linux Find modified file-find command at specified time

Source: Internet
Author: User
Tags file permissions

If you do not remember after modifying the file under Linux, we need to find the files that have been changed in the specified time, and we can use Find command to look for them.

Find/opt-iname "*"-atime 1-type F

"Find the files that/opt visited the next day."

Option options

All options always return true values, and they are always executed, unless they are placed in an expression that cannot be performed. So for clarity, it's best to put them at the beginning of an expression.

-daystart
Start at the beginning of the day rather than 24 hours before the calculation time (For-amin,-atime,-cmin,-ctime,-mmin, And-mtime).

-amin N
The most recent access to a file was before n minutes.

-anewer file
The most recent access to a file is later than file modification time. If the command line-follow before-anewer, (and only in this case-anewer will be affected by-follow).

-atime N
The most recent visit to a file was before n*24 hours.

-cmin N
The last modification to the file state was before n minutes.

-cnewer file
The last modification to the file state was later than file modification time. If the command line-follow before-cnewer, (and only in this case-cnewer will be affected by-follow).

-ctime N
The most recent modification to the file state was before n*24 hours.

-mmin N
The most recent modification to the file data was before n minutes.

-mtime N
The most recent modification to the file data was n*24 hours ago.

-mtime: A document that has been altered for a specified time, meaning a document? Jes. br/>
-ctime: A file that has been changed for a specified time, meaning that file permissions have been changed

-atime: A file that has been accessed for a specified time, meaning that the file has been read
1. The time is in 24 hours for a unit, not the day
2.2011/09/08 12:00 time to start looking for a day? Lai Harmony 2011/09/07 12:00 ~ 2011/09/08 12:00 time? Magpie/> BR
Find the 3-day "previous" files that were changed (before the third day before →2011/09/05 12:00) (> 72 hours)

find/var/log/-mtime +3-type F-print
Find out 3 days, missing an acre?? Nigerian Fundraiser (2011/09/05 12:00 ~ 2011/09/08 12:00? (0 ~ 72 hours??)

find/var/log/-mtime-3-type F-print
Find out which documents were changed on the 3rd day (2011/09/04 12:00 ~ 2011/09/05 12:00? (72 ~ 96 hours)

find/var/log/-mtime 3-type F-print
Find out which files were changed on the 3rd day (or write them)

find/var/log/-mtime +2-mtime-4-type f-print 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.