[Bug 233161] bsd find finds only 32756 directories with '-type d' switch

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Nov 12 13:41:18 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233161

            Bug ID: 233161
           Summary: bsd find finds only 32756 directories with '-type d'
                    switch
           Product: Base System
           Version: 11.2-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs at FreeBSD.org
          Reporter: emz at norma.perm.ru

I have a file storage with up to 5 milions objects on 1st level (this is
running on zfs):

# ls -ld /usr/local/public/profiles
drwxr-xr-x+ 32767 root  wheel  5097384 Nov 12 16:24 /usr/local/public/profiles

'find /usr/local/public/profiles -depth 1' is able to find these objects, and
they seem all to be directories (I've checked randomly, plus my colleagues that
wrote a software that works with this storage told me there should be no files
there).

but find /usr/local/public/profiles -type d -depth 1 is able to find only 32765
directories. I suspect this could be the MAXDIRS constant from ufs.h.

So I made two output files, one produced with 'find /usr/local/public/profiles
-depth 1' and one produced with 'find /usr/local/public/profiles -depth 1 -type
d', first file contains 5 millions of objects and second contains only 32756
objects, and pretty much all of the missing objects from the bigger file are
directories (though I didn't check all the 5 millions for obvious reasons).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list