当前位置: 技术问答>linux和unix
★★怎样获得一个文件的创建时间,修改时间,和访问时间?急!在线等待...
来源: 互联网 发布时间:2015-02-17
本文导语: 精确到分秒! 用shell怎么实现? | [root@galileo root]# stat readpci.c File: 'readpci.c' Size: 1373 Blocks: 8 IO Block: 4096 Regular File Device: 301h/769d Inode: 292466 ...
精确到分秒!
用shell怎么实现?
用shell怎么实现?
|
[root@galileo root]# stat readpci.c
File: 'readpci.c'
Size: 1373 Blocks: 8 IO Block: 4096 Regular File
Device: 301h/769d Inode: 292466 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2003-04-06 02:40:16.000000000 +0800
Modify: 2003-04-02 14:40:54.000000000 +0800
Change: 2003-04-05 18:40:26.000000000 +0800
[root@galileo root]#
---
这个能满足你的要求吗?
File: 'readpci.c'
Size: 1373 Blocks: 8 IO Block: 4096 Regular File
Device: 301h/769d Inode: 292466 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2003-04-06 02:40:16.000000000 +0800
Modify: 2003-04-02 14:40:54.000000000 +0800
Change: 2003-04-05 18:40:26.000000000 +0800
[root@galileo root]#
---
这个能满足你的要求吗?
|
stat函数