0

It's well known that the / directory has inode number 2 (see also Why does '/' have the inode 2). And we also know that hard links share the same inode number. So far so good.

Here's the confusing bit (notice the Inode: part):

$ stat /run
  File: /run
  Size: 940         Blocks: 0          IO Block: 4096   directory
Device: 16h/22d Inode: 2           Links: 32
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2018-09-10 10:22:18.198727482 +0800
Modify: 2018-09-10 02:47:58.655999930 +0800
Change: 2018-09-10 02:47:58.655999930 +0800
 Birth: -

The simple question is "Why do they have the same inode?" The /run directory is different from / and /run is not hardlink to /.

Stephen Kitt
  • 434,908

0 Answers0