The optimization used by dont_use_nlink => 0 relies on a feature not available on FAT and NTFS file systems, and you appear to be using such a file system.

The optimization only helps if you have empty directories (i.e. directories with no files except . and ..). If you have few such directories, the optimization isn't helping anyway. If you have many such directories, maybe you could delete them in advance to gain the same benefit as the optimization.


An explanation of the optimization:

On unix file systems, a directory's . is a hardlink to itself, and a directory's .. is a hardlink to its parent directory. So when you stat a directory, the link count returned by stat will be at least 1 (name) + 1 (.) + $num_sub_dirs (..).

$ ls -ld . drwx------ 5 ikegami ikegami 46 Dec 16 12:03 . # 5: Up to 3 subdirs $ ls -l . total 0 drwx------ 2 ikegami ikegami 10 Dec 16 12:03 a # 2: Empty drwx------ 3 ikegami ikegami 24 Dec 16 12:03 b # 3: Up to 1 subdir drwx------ 2 ikegami ikegami 10 Dec 16 12:03 c # 2: Empty

File::Find relies on that information to optimize itself when possible.

Perl and File::Find know this isn't the case for the FAT and NTFS file systems, so the optimization is disabled on Windows.


In reply to Re: File::Find won't iterate through CIFS share withouth "dont_use_nlink" by ikegami
in thread File::Find won't iterate through CIFS share withouth "dont_use_nlink" by reinaldo.gomes

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.