File modification time
File modification time (mtime) is the filesystem timestamp associated with the latest change to a file's contents or a directory's entries.
Writes and truncation update mtime; changing ownership or permissions alone does not. The timestamp can also be set explicitly with utimensat(), subject to permissions, without changing file contents. Filesystem resolution limits the stored value. [1] [2]
The default rsync quick check compares file size and mtime, not content. Its default comparison ignores nanoseconds; --modify-window=-1 includes them when the receiver is version 3.1.3 or later. Equal size and mtime are not proof of identical data. [3]
Relations
Advantages
- Provides a low-cost signal for selecting files that may need synchronization.
Limitations
- Can be preserved or reset independently of file contents.
- Filesystem and comparison precision can hide distinct changes.
Citations
- Linux man-pages: inode(7)
- Linux man-pages: utimensat(2)
- rsync(1): file selection and modification-time comparison