windows下可以通过右键点击文件或者文件夹选择属性来查看相关信息,那么在linux下就要使用stat命令来查看文件或者目录的属性(当然也可以使用ls命令加上相关的命令行选项列出属性)。

[root@localhost ~]# stat file1

  File: `file1'

  Size: 4096            Blocks: 8          IO Block: 4096   directory

Device: 802h/2050d      Inode: 2584587     Links: 2

Access: (0400/dr--------)  Uid: (    0/    root)   Gid: (    0/    root)

Access: 2013-02-17 17:31:19.000000000 +0800

Modify: 2013-02-16 14:41:09.000000000 +0800

Change: 2013-02-16 14:41:09.000000000 +0800

[root@localhost ~]# stat file1/f1

  File: `file1/f1'

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

Device: 802h/2050d      Inode: 2585358     Links: 1

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

Access: 2013-02-16 14:38:19.000000000 +0800

Modify: 2013-02-16 14:38:19.000000000 +0800

Change: 2013-02-16 14:38:19.000000000 +0800