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

Source: Internet
Author: User

Linuxfind

Brother even Linux Training

Summarizing these timestamps includes

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 hours away.

  +0 means 0 * +24 hours away

  1 means 1 * + from:

  0 means 0 * + 0 .

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

  1. Current hour - Current time ( yesterday - today )

  #find. -mtime 0

  2. Current time : Before the current hour ( before the day before – yesterday )

  #find. -mtime 1

  3. Current time (2 days ago )

  #find. -mtime +1

  4. Current Hour – Current time ( yesterday - today )

  #find. -mtime-1



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

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.