Linux find mtime Parameters

Source: Internet
Author: User


When using the mtime parameter in the find command, you will see the official explanation as follows:-mtime n File's data was last modified n * 24 hours ago. see the comments for-atime to understand how rounding affects the interpretation of file modification times.
However, what are the differences between the +,-, and unsigned usage in various reference methods?
Note that n here. If n is a value with a plus sign (+), it means to delete all files created before n days. For example, n = + 1 and today is the 15th day, delete data before the 14th, excluding the 14th. If it is a negative number (n =-1), it is used to delete files within one day, such as the 15th day of the current day, delete data on the 15th. If it is (n =-2), all data from the previous day to the current day will be deleted. For example, if it is on the 15th day, it will be deleted from the 14th day. If there is no symbol, the data of the specified day in the previous n days will be deleted. For example, if (n = 1) and today is the 15th day, all data of the day on the 14th will be deleted. Www.2cto.com note that one day is counted from the current system time, rather than 0-24 hours.

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.