fd
fd copied to clipboard
[Feature request] Support "-links" option from find
Hello there,
Thanks for your great tool.
Could consider adding the -links options of find to fd ?
-links n
File has less than, more than or exactly n hard links.
It is really useful for certain cases, such as listing only leaf folders.
Cheers!
Are there any other use cases?
As a user, I think it would be more useful to have an option to filter to leaf directories, than have a -links option that requires the user to know that the "hard link count" for a directory is 2 + the number of subdirectories.
And for the case of "leaf directories" I think the most consistent API would be to add a leafdir type to the --type argument.
I don't have other use cases in my mind, but ok for a leafdir type !