码迷,mamicode.com
首页 > 系统相关 > 详细

linux中的时间分为那些?

时间:2017-07-30 23:28:49      阅读:203      评论:0      收藏:0      [点我收藏+]

标签:linux   学习   

1.1    Linux中的时间分为三种

1.mtimemodify time   修改时间,文件/目录的修改时间,文件内容修改

2.ctimechange time     改变时间,文件/目录的属性的变化,修改时间,大小,硬链接数,权限,所有者,所属组,类型

3.atimeaccess time      访问时间,文件/或目录的访问时间,查看文件之后,内容没变化之前再次访问的话,访问时间不变化

使用stat查看文件详细信息

[root@qizhong tmp]# stat test.txt

  File:`test.txt‘

  Size:0          Blocks: 0          IO Block:4096   regular empty file

Device: 803h/2051d Inode:398305      Links: 1

Access: (0644/-rw-r--r--)  Uid: (   0/    root)   Gid: (   0/    root)

Access: 2017-07-29 15:02:22.478435838 +0800           ##访问时间

Modify: 2017-07-29 15:02:22.478435838 +0800           ##修改时间

Change: 2017-07-29 15:02:22.478435838 +0800           ##改变时间

[root@qizhong tmp]# echo 1 >test.txt

[root@qizhong tmp]# stat test.txt

  File:`test.txt‘

  Size:2          Blocks: 8          IO Block:4096   regular file

Device: 803h/2051d Inode:398305      Links: 1

Access: (0644/-rw-r--r--)  Uid: (   0/    root)   Gid: (   0/    root)

Access: 2017-07-29 15:02:22.478435838 +0800

Modify: 2017-07-29 15:03:09.540436756 +0800

Change: 2017-07-29 15:03:09.540436756 +0800

[root@qizhong tmp]# cat test.txt

1

[root@qizhong tmp]# stat test.txt

  File:`test.txt‘

  Size:2          Blocks: 8          IO Block:4096   regular file

Device: 803h/2051d Inode:398305      Links: 1

Access: (0644/-rw-r--r--)  Uid: (   0/    root)   Gid: (   0/    root)

Access: 2017-07-29 15:03:30.688435443 +0800

Modify: 2017-07-29 15:03:09.540436756 +0800

Change: 2017-07-29 15:03:09.540436756 +0800

[root@qizhong tmp]#




<>>新手,请多多指教<><><><><><><><><><><><<><><><><><><><><><><><>>

本文出自 “qizhong” 博客,请务必保留此出处http://qizhong.blog.51cto.com/12933988/1952086

linux中的时间分为那些?

标签:linux   学习   

原文地址:http://qizhong.blog.51cto.com/12933988/1952086

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!