On unix file systems, a directory .is a hard link to itself, and a directory ..is a hard link to the parent directory. Therefore, when you statcatalog, the reference counter returned statwill be no less 1 (name) + 1 (.) + $num_sub_dirs (..).
$ ls -ld .
drwx------ 5 ikegami ikegami 46 Dec 16 12:03 .
$ ls -l .
total 0
drwx------ 2 ikegami ikegami 10 Dec 16 12:03 a
drwx------ 3 ikegami ikegami 24 Dec 16 12:03 b
drwx------ 2 ikegami ikegami 10 Dec 16 12:03 c
File :: Find relies on this information to optimize itself when possible.
Perl File:: Find , FAT NTFS, Windows. VSL Linux , , unix.
- , :
perl -MConfig -e'CORE::say $INC{"Config.pm"}'
dont_use_nlink => undef
dont_use_nlink => 1
,
$ perl -V:dont_use_nlink
dont_use_nlink='1';
.