M
M
m2_viktor2015-06-08 10:08:01
linux
m2_viktor, 2015-06-08 10:08:01

What can explain the large number of hard links to the directory?

Hello, there is a file dump on debian7. Below is the output of the ls -l command for one of the directories. As you can see, for some directories, for example 7-ZipPortable, the number of hard links is 5. But I deliberately did not create these links. How can this be explained? Even earlier, these directories lived on ntfs partitions, before moving to debian.
[email protected]:/mnt/data2/Distrib/util$ ls -l
total 4012
drwxrwxrwx 5 root root 4096 Feb 24 12:23 7-ZipPortable
drwxrwxrwx 5 root root 4096 Feb 24 12:23 CPU-ZPortable
drwxrwxrwx 5 nobody nogroup 4096 Apr 2 16:54 EverestPortable
drwxrwxrwx 3 root root 4096 Feb 24 12:23 StartetPportable
-rwxrwxrwx 1 root root
drwxrwxrwx 3 root root 4096 Feb 24 12:23 VCR446Free

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eddy_Em, 2015-06-08
@m2_viktor

This is because of the nested directories. If there are no nested directories, then only 2 hardlinks (the directory itself + "."). If there are N subdirectories, then N hardlinks ".." from each nested directory are added to these two hardlinks.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question