The find command has several options for searching files based on your system's timestamp. These timestamps include the time when the atime file was last modified, the time when the file was read or accessed, and the ctime file state change time. mtime and atime are both easy to understand, ctime requires more explanation. Inode maintains the metadata of each file. Therefore, if the metadata related to the file changes, the inode data also changes. This may be caused by a series of operations
The find command has several options for searching files based on your system's timestamp. These timestamps include
Last modification time of mtime file content atime file was read or accessed time ctime file state change time
Mtime and atime are both easy to understand, while ctime requires more explanations. Inode maintains the metadata of each file. Therefore, if the metadata related to the file changes, the inode data also changes. This may be caused by a series of operations, including creating symbolic links to files, changing file permissions, or moving files. In these cases, the file content will not be read or modified, so mtime and atime will not change, but ctime will change.
These time options must be used together with a value of n, specified as-n, n or + n.
N * 24 + 1 indicates 1*24 + 24 hours away .. + 0 indicates 0*24 + 24 hours; 1 indicates the range from 1*24 + 24 to 24 .. 0 indicates 0*24 + 24 to 0 .. -1 indicates 0*24 + 24, or even the future time...
1. Current time: 24 hours-current time (yesterday-today)
# Find.-mtime 0
2. Current Time 48 hours ago? Current time 24 hours ago (the day before yesterday-yesterday)
# Find.-mtime 1
3. the current time is 48 hours ago (2 days ago)
# Find.-mtime + 1
4. is the current time 24 hours? Current time (yesterday-today)
# Find.-mtime-1