# 如何查看一个文件的 inode number



::: tip Issue 
 欢迎在 Issue 中交流与讨论: [Issue 115](https://github.com/shfshanyue/Daily-Question/issues/115) 
:::

::: tip Author 
回答者: [shfshanyue](https://github.com/shfshanyue) 
:::

可以使用 `ls` 或者 `stat`

``` bash
$ stat hello.txt
  File: ‘hello.txt’
  Size: 30              Blocks: 8          IO Block: 4096   regular file
Device: fd01h/64769d    Inode: 917526      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2019-12-10 16:15:55.253325208 +0800
Modify: 2019-12-10 16:15:52.740653330 +0800
Change: 2019-12-10 16:15:52.742653069 +0800

$ ls -i hello.txt
917526 hello.txt
```