Linux index node and Value
Linux index nodes and values (essential ).
Audience,
[Root@www.linuxdc.com aaa] # ls-l test. c
-Rw-r --. 1 root 3 Aug 1 07:49 test. c # Look at bold 1 raw test. the index node value of the c file is 1, that is, each file is unique when it is generated for the first time.
[Root@www.linuxdc.com aaa] # ln test. c test1.c # Hard link file test1.c
[Root@www.linuxdc.com aaa] # ls-li test *
262594-rw-r --. 2 root 3 Aug 1 07:49 test1.c
262594-rw-r --. 2 root 3 Aug 1 07:49 test. c # Why does it change to 2 here? It is because the hard link is automatically increased by 1. In fact, it is easy to understand that the linux File System is the structure of a tree node.
# Check again. If I delete test. c, check it out.
[Root@www.linuxdc.com aaa] # rm-rf test. c
[Root@www.linuxdc.com aaa] # ls-li test *
262594-rw-r --. 1 root 3 Aug 1 test1.c # changed back. Pay attention to the fact that this value remains unchanged, or 2, which is incorrect.
All in all, Linux is a tree node system consisting of Tree node files. The logic for operating all files is the same as that of the tree.
This article permanently updates the link address: