Link count
Hi
Can someone explain to me what a link count is and how it works? |
Could you describe the context a little more please?
I assume you talk about hard links on the filesystem (the one you see when you type ls -l) for now, but I really don't know. so, if you are talking about links on the filesystem, a hard link count is the number of links to a file and it is incremented when a link is made and decremented when a link is removed. |
here in my papers it says: for each file and directory there exist a link count.
|
Indeed, a file link is a basically a file name. A file can have several names everywhere in the directory tree.
The same goes for directories. If you create a file and give it 2 names, it has 2 links. When you remove one link, the file is still there. when you remove all links, the file is deleted. The link count is the number of names a file has. You can create a link with the 'ln' command. |
All times are GMT -5. The time now is 10:01 AM. |