Skip to content

Implement -noleaf #376

Closed
Closed

Description

@hanbings

refer: https://www.gnu.org/software/findutils/manual/html_node/find_html/Directories.html

Option: -noleaf

Do not optimize by assuming that directories contain 2 fewer subdirectories than their hard link count. 
This option is needed when searching filesystems that do not follow the Unix directory-link convention, 
such as CD-ROM or MS-DOS filesystems or AFS volume mount points. 
Each directory on a normal Unix filesystem has at least 2 hard links: its name and its . entry. 
Additionally, its subdirectories (if any) each have a .. entry linked to that directory. 
When find is examining a directory, 
after it has statted 2 fewer subdirectories than the directory’s link count, 
it knows that the rest of the entries in the directory are non-directories (leaf files in the directory tree). 
If only the files’ names need to be examined, 
there is no need to stat them; this gives a significant increase in search speed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions