Linux Basic Tutorial Linux uses the Find command to find file usage based on system time

Source: Internet
Author: User
Tags file permissions

  


Linuxfind

Brother even Linux training summary these timestamps include

Copy the code code as follows:

Mtime file content Last modified

The time that the Atime file was read or accessed

CTime File Status Change time

The meaning of Mtime and atime is easy to understand, and ctime needs more explanations. Because the inode maintains the metadata on each file, the Inode data also changes if the file-related metadata changes. This can be caused by a series of actions, including creating symbolic links to files, changing file permissions, or moving files. Because in these cases, the contents of the file are not read or modified, so mtime and atime do not change, but CTime will change.

These time options need to be used in conjunction with a value of n, specified as-n, N, or +n.

Copy the code code as follows:

N * 24

+1 means 1 * 24 + 24 hours away:

+0 means 0 * 24 + 24 hours away

1 means 1 * 24 + 24 to 24.

0 means 0 * 24 + 24 to 0.

-1 means 0 * 24 +24 inside, even for future time ...

1. Current time 24 h-current time (Yesterday-today)

#find. -mtime 0

2. Current time 48 hours ago – Current time 24 hours ago (the day before yesterday)

#find. -mtime 1

3. Current time 48 hours ago (2 days ago)

#find. -mtime +1

4. Current time 24 hours – current time (yesterday-today)

#find. -mtime-1


Linux Basic Tutorial Linux uses the Find command to find file usage based on system time

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.