stat
功能说明:stat命令用于详细显示文件或文件系统的状态信息。
查看文件的属性信息
[root@testdb ~]# stat /etc/hosts
File: ‘/etc/hosts’
Size: 238 Blocks: 8 IO Block: 4096 regular file
Device: fd01h/64769d Inode: 265635 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2020-09-22 13:26:19.566000000 +0800
Modify: 2020-09-22 13:26:19.566000000 +0800
Change: 2020-09-22 13:26:19.567000000 +0800
Birth: -
输出说明:
Size:文件大小。
Blocks:占用block数量。
IO Block:Block总大小为4096(8*512)。
regelar file:文件类型为普通文件。
Device:设备编号的十六进制(h)和十进制(d)。
Inode:文件的inode值。
Links:文件的硬连接数。
Access (0644/-rw-r--r--):文件权限。
Uid、Gid:用户和用户组。
Access:访问时间。
Modify:修改时间。
Change:状态修改时间。