Use the find command under linux to find file usage based on system time

Linux Basic Tutorial Use the find command under linux to find files based on system time usage
LinuxFind
  copy code code is as follows:
  mtime file content last modification time
  atime file read or access time
  ctime file status change time
  mtime and atime meanings are very easy understandable, while ctime needs more explanation. Because inodes maintain metadata on each file, if the metadata about the file changes, the inode data will also change. This can be caused by a range of actions, including creating a symbolic link to the file, changing file permissions, or moving the file, etc. Since the file contents will not be read or modified in these cases, mtime and atime will not change, but ctime will.
  Each of these time options needs to be combined with a value n, specified as -n, n, or +n.
  Copy code The code is as follows:
  N * 24
  +1 means 1 * 24 + 24 hours outside..
  +0 means 0 * 24 + 24 hours outside
  1 means 1 * 24 + 24 to 24..
  0 means 0 * 24 + 24 Between 0..
  -1 means 0 * 24 +24, even in the future...
  1. Current time 24 hours - current time (yesterday-today)
  #find . -mtime 0
  2. Current time 48 hours ago – 24 hours before the current time (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

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326409508&siteId=291194637