![](/img/trans.png)
[英]Why do I get incorrect timestamp on mounted file system on ubuntu?
[英]how to get ubuntu file timestamp in millisecond
Linux的朋友們,你們怎么在Ubuntu中以毫秒的分辨率獲得文件時間戳? 當我在我的系統上嘗試命令“stat”時,我得到:
File: `tmp.dat'
Size: 14 Blocks: 8 IO Block: 4096 regular file
Device: 811h/2065d Inode: 13895454 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ yqin) Gid: ( 1004/ dev)
Access: 2010-09-27 09:04:44.000000000 -0400
Modify: 2010-09-25 13:54:58.000000000 -0400
Change: 2010-09-25 13:54:58.000000000 -0400
似乎分辨率只有第二。 有任何想法嗎? 非常感謝。
這取決於文件系統。 fat
會給你2秒的分辨率。 ext2
和ext3
基於秒。 ext4
有納秒( http://www.softpanorama.org/Internals/Filesystems/linux_ext2_ext3.shtml ,搜索“最小時間戳分辨率”)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.