unix 中的文件创建时间 [英] File creation time in unix

查看:30
本文介绍了unix 中的文件创建时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能告诉我为什么unix不存储文件创建时间?它存储修改时间,更改时间和访问时间而不存储创建时间,这对它来说是一个很大的负担吗?有什么具体原因吗?

Can anybvody tell me why unix does not store the file creation time? Is it such a big burden to it as it stores modification time,change time and access time but not creation time? Is there any specific reason for it?

或者是通过使用某种语言(任何编程语言)和一些系统调用我们可以通过某种方式获得文件创建时间吗?

or is it through using some language(any programming language) and some system calls can we get the file creation time some how?

推荐答案

我相信像这样的信息是 inode 的职责来存储,因此是文件系统本身的限制.快速搜索一下,结果是 ext4 文件系统在其 inode 中为该文件属性添加了存储空间.

I believe that information like that is the responsibility of the inode to store and, therefore, a limitation of the file system itself. A quick googling and it turns out that the ext4 file system has added storage for that file attribute in its inode.

ext4 时间戳

这篇关于unix 中的文件创建时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆