Linux运维系统工程师系列08

本文发布时间: 2019-Mar-22
[root@server254 stk]# ll jk-rw-rwxr--+ 1 joke joke 10 Oct 17 09:45 jkstat:显示文件和文件系统的状态,也可以读取文件的inode信息[root@server254 ~]# mkdir /test[root@server254 ~]# cd /test/[root@server254 test]# echo happy > 1017[root@server254 test]# stat 1017File: `1017'Size: 6 Blocks: 8 IO Block: 4096 regular fileDevice: 802h/2050dInode: 655376 Links: 1Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)Access: 2013-10-17 10:14:19.569022191 +0800Modify: 2013-10-17 10:14:19.569022191 +0800Change: 2013-10-17 10:14:19.569022191 +0800Modify:mtime——modify time:修改文件内容的时间vim :如果修改内容,三个时间均发生变化[root@server254 test]# stat 1017File: `1017'Size: 6 Blocks: 8 IO Block: 4096 regular fileDevice: 802h/2050dInode: 655376 Links: 1Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)Access: 2013-10-17 10:18:09.466020132 +0800Modify: 2013-10-17 10:14:19.569022191 +0800Change: 2013-10-17 10:14:19.569022191 +0800[root@server254 test]# vim 1017[root@server254 test]# stat 1017File: `1017'Size: 10 Blocks: 8 IO Block: 4096 regular fileDevice: 802h/2050dInode: 655378 Links: 1Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)Access: 2013-10-17 10:20:57.377020788 +0800Modify: 2013-10-17 10:20:57.377020788 +0800Change: 2013-10-17 10:20:57.390020657 +0800echo >> :mtime和ctime发生变化[root@server254 test]# stat 1017File: `1017'Size: 10 Blocks: 8 IO Block: 4096 regular fileDevice: 802h/2050dInode: 655378 Links: 1Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)Access: 2013-10-17 10:21:49.187020625 +0800Modify: 2013-10-17 10:20:57.377020788 +0800Change: 2013-10-17 10:20:57.390020657 +0800[root@server254 test]# echo hello >> 1017[root@server254 test]# stat 1017File: `1017'Size: 16 Blocks: 8 IO Block: 4096 regular fileDevice: 802h/2050dInode: 655378 Links: 1Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)Access: 2013-10-17 10:21:49.187020625 +0800Modify: 2013-10-17 10:23:20.183020715 +0800Change: 2013-10-17 10:23:20.183020715 +0800Access:atime——access time:查看文件的时间,cat,morerhel 5:当你cat文件时候,atime是变的。rhel 6:优化了,只变一次Change:ctime——change time:修改文件的属性的时候变化(如改名、大小变化、改权限等等)


(以上内容不代表本站观点。)
---------------------------------
本网站以及域名有仲裁协议。
本網站以及域名有仲裁協議。

2020-Jul-13 01:14am
栏目列表