how to get ubuntu file timestamp in millisecond
Linux friends, how do you guys get a file timestamp in the resolution of milliseconds in Ubuntu? When I tried the command "stat" on my system, I get:
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开发者_Python百科:54:58.000000000 -0400
Change: 2010-09-25 13:54:58.000000000 -0400
It seems that the resolution is only up to second. Any ideas? Thanks a lot.
That depends on the filesystem. fat
will give you 2 second resolution. ext2
and ext3
are based on seconds. ext4
has nanoseconds (http://www.softpanorama.org/Internals/Filesystems/linux_ext2_ext3.shtml, search for "minimum timestamp resolution").
精彩评论