What is the difference between Ctime and Mtime?
mtime , or modification time, is when the file was last modified. When you change the contents of a file, its mtime changes. ctime , or change time, is when the file’s property changes. It will always be changed when the mtime changes, but also when you change the file’s permissions, name or location.
What’s the difference between ctime 1 and ctime + 1?
That means all the jar files in the directory had status changes less than 48 hours ago. -ctime n File’s status was last changed n*24 hours ago. And When find figures out how many 24-hour periods ago the file was last accessed, any fractional part is ignored, so to match -atime +1, a file has to have been accessed at least two days ago.
How is Mtime used in the find command?
So I will describe find’s use of the -mtime option. As you probably know, the find command can run for minutes or hours depending on the size of the filesystem being searched. The find command makes a note of its own start time. It then looks at a file’s mtime and computes how many seconds ago the file was modified.
What’s the difference between ctime and Mtime in Linux?
There does seem to be some confusion between mtime and ctime though. ctime is the inode change time while mtime is the file modification time. “Change” and “modification” are pretty much synonymous. There is no clue to be had by pondering those words. Instead you need to focus on what is being changed. mtime changes when you write to the file.
Where does find ctime look for a file?
It finds files inside $AUDIT_DIR with the extension xml, aud, or txt. I don’t think negative numbers make any sense here — they’re not mentioned in find’s documentation, so I think it’d either look for a file changed in the future, or end up as some really old time caused by integer wraparound… Ask who wrote it what it’s intended to do.