Perl File::Find

Gooberlx2

Lifer
May 4, 2001
15,381
6
91
I have a perl script that uses File::Find to recurse through a directory tree and does operations on all .dcm files. The script works fine on local hard disks, but I'm finding that with a NAS (lacie ethernet bigdisk 2TB) it will only recurse to the second directory level.

Files are located like this: /study/dicom/.dcm_files

but the script seems to only be recursing down to /study/dicom


Is this a limitation of SMB/CIFS, only returning two directory levels? Or Perl's File::Find, or the NAS in question?

Any ideas? On this NAS I have some 5385 study directories, with 5381 using the folder format mentioned above...containing some 2.4 million .dcm files that need to be processed. Fixing everything by hand in pretty much not a viable option.
 

Gooberlx2

Lifer
May 4, 2001
15,381
6
91
Doh, asked for help just a little too early before I found it.

...it seems that I needed to set $File::Find::dont_use_nlink = 1;

Though it would appear, from the API, and what some people said at perlmonks, that's an indication of either a bug with the filesystem or with File::Find.