$linuxjunkies
>

mtime

also: modification time

mtime (modification time) is the timestamp recording when a file's contents were last changed. It differs from access time (atime) and change time (ctime), which track when the file was read and when its metadata changed, respectively.

mtime is one of three key timestamps stored with every file in Linux. It records the exact moment the file's data was last modified, separate from when it was merely accessed or had its permissions altered.

You can view a file's mtime using ls -l or stat. For example, stat myfile.txt shows all three timestamps. The touch command can update mtime to the current time without editing the file's contents.

mtime is essential for tools like make and backup utilities, which use it to determine whether a file has changed since the last build or backup. For instance, find . -mtime -1 locates files modified within the last day.

Related terms