linux mtime
How to get the mtime
of a file on Linux from the file’s path?
如何从文件路径获取Linux上文件的mtime
?
You can use stat
to get the file status including the mtime:
您可以使用stat
来获取文件状态,包括mtime:
%y time of last modification, human-readable %Y time of last modification, seconds sinceEpoch
%y time of last modification, human-readable %Y time of last modification, seconds sinceEpoch
As an example,
举个例子,
$ stat -c %y ./file
2017-06-26 13:33:06.764042064 +0800
$ stat -c %Y ./file
1498455186
Answered by Eric Z Ma.
埃里克·马(Eric Z Ma)回答。
翻译自: https://www.systutorials.com/how-to-get-the-mtime-of-a-file-on-linux/
linux mtime