os.stat 返回 st_mtime 和 st_ctime 属性,修改时间是 st_mtime 和 st_ctime 在 POSIX 上的“更改时间”。 有没有使用python和Linux下返回文件创建时间的函数?
最佳答案
3.1) How do I find the creation time of a file? You can't - it isn't stored anywhere. Files have a last-modified time (shown by "ls -l"), a last-accessed time (shown by "ls -lu") and an inode change time (shown by "ls -lc"). The latter is often referred to as the "creation time" - even in some man pages - but that's wrong; it's also set by such operations as mv, ln, chmod, chown and chgrp. The man page for "stat(2)" discusses this.
关于python - 在 Linux 上使用 Python 获取文件创建时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1408272/