Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find vs fd #560

Closed
blueray453 opened this issue Apr 8, 2020 · 3 comments
Closed

find vs fd #560

blueray453 opened this issue Apr 8, 2020 · 3 comments

Comments

@blueray453
Copy link

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?

@sharkdp
Copy link
Owner

sharkdp commented Apr 8, 2020

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 (Add delete command to remove matching files and directories #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 Finding by owner username/group/uid/gid #307)

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

Some tickets from the past:

@data-man
Copy link

data-man commented Apr 8, 2020

@sharkdp if you don't mind fselect also is very good.

@blueray453
Copy link
Author

blueray453 commented Apr 8, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants