Example of using the LinuxFind command to search for objects within a specified time range

Source: Internet
Author: User
This article describes how to use the LinuxFind command to find files within a specified time range. For more information, see LinuxFind.

For example, to find the file between '2017-08-08 'and '2017-09-01', run the following command:


Copy codeThe code is as follows: find/log/-name 'production. log-2013 * '-newermt '2017-08-08 '! -Newermt '2017-09-0

Can I start searching for a day at a.m. on February 1? Magpie mould? 1/09/07 ~ ? Que nai? Br/> find the files Modified 3 days ago (files earlier than the third day before) (> 72 hours)

Copy codeThe code is as follows: find/var/log/-mtime + 3-type f-print

3 days? Missing mu ?? Nead ~ 2011/09/08? 00? Que nai? (0 ~ 72 hours ??

Copy codeThe code is as follows: find/var/log/-mtime-3-type f-print
Find the files modified in the previous 3rd days ~ ? Que nai? (72 ~ 96 hours)

Copy codeThe code is as follows: find/var/log/-mtime 3-type f-print
Find the file that has been modified in the last day (you can also write it like this)

Copy codeThe code is as follows: find/var/log/-mtime + 2-mtime-4-type f-print

Related Article

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.