2

I make a new dir in linux filesystem.

Why the num of hard links of this item is 2?

drwxr-xr-x 2 zuser zuser 4096 2013-12-12 19:00 newdir/

artless noise
  • 21,212
  • 6
  • 68
  • 105
pensz
  • 1,871
  • 1
  • 13
  • 18

1 Answers1

6

An empty directory has two hard links to it, the normal entry in the parent directory, and the special directory entry ..

(The special directory entry .. increases the hard link count of the parent directory.)

CL.
  • 173,858
  • 17
  • 217
  • 259