You crossing,
[Email protected] aaa]# ls-l test.c
-rw-r--r--.
1Root root 3 1 07:49 test.c #看加粗1 The original test.c file index node value is 1, which is the first time each file is generated with a unique 1 value
[Email protected] aaa]# ln test.c test1.c #硬链接文件test1. C
[Email protected] aaa]# Ls-li test*
262594-rw-r--r--.
2 Root root 3 1 07:49 test1.c
262594-rw-r--r--. 2 root root 3 1 07:49 test.c #这里为什么变成2呢, because the hard link automatically 1, in fact, very well understand that the Linux file system is a tree node structure, think it clear
#再看 If I delete test.c look at
[Email protected] aaa]# RM-RF test.c
[Email protected] aaa]# Ls-li test*
262594-rw-r--r--. 1 root root 3 1 07:49 test1.c #变回来了吧, note that a lot of data say this value is unchanged, or 2, is wrong.
All in all, Linux is a tree node system, composed of tree node files, the operation of all files are the same as the logic of the tree