I am trying to discover a better alternative to find command.
fd seems nice and quite complete. However, the documentation says:
While it does not seek to mirror all of find's powerful functionality, it provides sensible (opinionated) defaults for 80% of the use cases.
I am wondering what those missing 20% use cases are where I might need find.
Can you please shed some light on this topic?
I am wondering what those missing 20% use cases are where I might need find.
For me personally, fd can cover more like 99% of the use cases. This percentage has also increased over the last years since I wrote that statement. However, I still consider the statement to be an important design guideline of fd. We are not trying to solve every possible use case with fd.
Some things that are not possible with fd (this list is not exhaustive):
fd (contrived example): find files which have a .py extension OR (files which have a .json extension AND have been modified within the last two weeks)-mindepth or -depth-anewer, -atime, etc.You can probably find much more by going through the find manpage.
Some tickets from the past:
find . -mindepth 4 -maxdepth 4 \( -path '*foo/bar' -o -name '*ignore*' -o -path '*blah/etc*' \) -prune -o \( -perms 644 -o -perms 664 \) -name '*unicorn-sprinkles*' -exec cool-command-goes-here {} \;@sharkdp if you don't mind fselect also is very good.
@sharkdp if you don't mind fselect also is very good.
I use regprep, sd on a regular basis. So, I hope I will be much more comfortable with fd.
Moreover, the issues @sharkdp mentioned are almost non-issue to me (except the lookbehind thing).
And one more crucial thing that is very important for me is the lead of the project. This is important because if he is not positive then (probably) sooner or later the total project will fall apart and we have to relearn another too.
Being said that, I think he has positive attitude and right mindset. This is because, I asked him to tell me the flaws of his product and he told me without hesitation.
Most helpful comment
For me personally,
fdcan cover more like 99% of the use cases. This percentage has also increased over the last years since I wrote that statement. However, I still consider the statement to be an important design guideline offd. We are not trying to solve every possible use case withfd.Some things that are not possible with
fd(this list is not exhaustive):fd(contrived example): find files which have a.pyextension OR (files which have a.jsonextension AND have been modified within the last two weeks)-mindepthor-depth-anewer,-atime, etc.You can probably find much more by going through the
findmanpage.Some tickets from the past:
find . -mindepth 4 -maxdepth 4 \( -path '*foo/bar' -o -name '*ignore*' -o -path '*blah/etc*' \) -prune -o \( -perms 644 -o -perms 664 \) -name '*unicorn-sprinkles*' -exec cool-command-goes-here {} \;