发布于 2020-12-30 04:10:16
您可以通过请求浮点输出获得纳秒时间戳:
% stat -f %Fm foo
1609297230.485880489发布于 2018-08-21 06:46:16
没有命令,但是您可以创建一个简单的C程序来测试它:
#include <stdio.h>
#include <sys/stat.h>
int main() {
struct stat attr;
stat("/path/to/file", &attr);
printf("Last modified time: %ld", (long)attr.st_mtimespec.tv_nsec);
}https://stackoverflow.com/questions/46639300
复制相似问题