Fd: find vs fd

Created on 8 Apr 2020  路  3Comments  路  Source: sharkdp/fd

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?

Most helpful comment

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):

  • Complex logic: that's probably the biggest point of all. You can not do something like this with 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
  • 100% "safe" way of deleting all search results (https://github.com/sharkdp/fd/pull/387)
  • Very fine-grained file access time queries, like -anewer, -atime, etc.
  • Finding by owner username/group/uid/gid (might be implemented at some point, see #307)

You can probably find much more by going through the find manpage.

Some tickets from the past:

All 3 comments

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):

  • Complex logic: that's probably the biggest point of all. You can not do something like this with 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
  • 100% "safe" way of deleting all search results (https://github.com/sharkdp/fd/pull/387)
  • Very fine-grained file access time queries, like -anewer, -atime, etc.
  • Finding by owner username/group/uid/gid (might be implemented at some point, see #307)

You can probably find much more by going through the find manpage.

Some tickets from the past:

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mwgkgk picture mwgkgk  路  3Comments

ChengCat picture ChengCat  路  3Comments

hungptit picture hungptit  路  3Comments

mrzool picture mrzool  路  4Comments

mathomp4 picture mathomp4  路  4Comments