6.3. 文件属性:stat

命令 stat 显示文件属性:

tester@linux:~> stat /etc/profile
  File: `/etc/profile'
  Size: 7930            Blocks: 16         IO Block: 4096   regular file
Device: 303h/771d       Inode: 40657       Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2006-01-06 16:45:43.000000000 +0100
Modify: 2005-11-21 14:54:35.000000000 +0100
Change: 2005-12-19 09:51:04.000000000 +0100
  

参数 --filesystem 将生成指定文件所在文件系统的属性详细信息:

 
tester@linux:~> stat /etc/profile --filesystem 
  File:"/etc/profile" 
    ID:0        Namelen:255     Type:reiserfs 
块大小:4096       基本块大小:4096             
Blocks:Total:2622526   Free:1809771   Available:1809771 
Inodes:Total:0   Free: 0