A simple, fast and user-friendly alternative to ‘find’
github.com
github.com
Fd is featured on Julia Evans' recent "New(ish) command line tools"[1]
[1] https://jvns.ca/blog/2022/04/12/a-list-of-new-ish--command-l... https://news.ycombinator.com/item?id=31009313 (760 points, 37d ago, 244 comments)
I’ve also been using bat and exa which are pretty good replacements for cat and ls, respectively.
nnn is also my go to file tree navigation / file moving tool these days too: https://github.com/jarun/nnn
# Colorify man (changes default $MANPAGER (less) settings)
export LESS_TERMCAP_mb='^[[01;31m'
export LESS_TERMCAP_md='^[[01;31m'
export LESS_TERMCAP_me='^[[0m'
export LESS_TERMCAP_se='^[[0m'
export LESS_TERMCAP_so='^[[01;44;33m'
export LESS_TERMCAP_ue='^[[0m'
export LESS_TERMCAP_us='^[[01;32m'It would be interesting to test the ~1.5GB of JSON the author uses for the benchmark against sed, but there are no details on how many files nor what those files contain.
When trying something relatively small and simple, sd appears to be slower than sed. It also appears to require more memory. Maybe others will have different results.
sh # using dash not bash
echo j > 1
time sed s/j/k/ 1
time -p sed s/j/k/ 1
time sd j k 1
time -p sd j k 1
Opposite problem as the sd author for me. For system tasks, more familiar with faster sed and awk than with slower Python and Javascript, so I wish that Python and Javascript regex looked more like sed and awk, i.e., BRE and occasionally ERE. Someone in the NetBSD core group once wrote a find(1) alternative that had C-like syntax, similar to how awk uses a C-like syntax. Makes sense because C is the systems language for UNIX. Among other things, most of the system utilities are written in it. If the user knows C then she can read the system source and modify/repair the system where necessary, so it is beneficial to become familiar with it. Is anyone is writing system utility alternatives in Rust that use a Rust-like syntax.1) greps support POSIX-compatible regexes, which come in two flavors: BREs and EREs. BREs permit back-references and have different escaping rules that tend to be convenient in some cases. For example, in BREs, '+' is just a literal plus-sign but '\+' is a regex meta character that means "match one or more times." In EREs, the meanings are flipped. POSIX compatible regexes also use "leftmost longest" where as ripgrep uses "leftmost first." For example, 'sam|samwise' will match 'sam' in 'samwise' in "leftmost first," but will match 'samwise' in "leftmost longest."
2) greps have POSIX locale support. ripgrep intentionally just has broad Unicode support and ignores POSIX locales completely.
3) ripgrep doesn't have "equivalence classes." For example, `echo 'pokémon' | grep 'pok[[=e=]]mon'` matches.
4) grep conforms to a standard---POSIX---where as ripgrep doesn't. That means you can (in theory) have multiple distinct implementations that all behave the same. (Although, in practice, this is somewhat rare because some implementations add a lot of extra features and it's not always obvious when you use something that is beyond what POSIX itself strictly supports.)
I think that probably covers it, although this is all off the cuff. I might be forgetting something. I suppose the main other things are some flag incompatibilities. For example, grep has '-h' as short for '--no-filename'. Also, since ripgrep does recursive search by default, there are no -r/-R flags. Instead, -r does replacements and -R is unused. -L is used for following symlinks (like 'find').
Does this mean that there's no support for language specific case mappings (e.g. iİ and ıI in Turkic)?
This document outlines Unicode support more precisely for ripgrep's underlying regex engine: https://github.com/rust-lang/regex/blob/master/UNICODE.md
The specific reason is hard to articulate precisely, but it basically boils down to "difficult to implement." The UTS#18 spec is a tortured document. I think it's better that it exists than not, but if you look at its history, it's undergone quite a bit of evolution. For example, there used to be a "level 3" of UTS#18, but it was retracted: https://unicode.org/reports/tr18/#Tailored_Support
And to be clear, in order to implement the Turkish dotless 'i' stuff correctly, your implementation needs to have that "level 3" support for custom tailoring based on locale. So you could actually elevate your question to the Unicode consortium itself.
I'm not plugged into the Unicode consortium and its decision making process, but based on what I've read and my experience implementing regex engines, the answer to your question is reasonably simple: it is difficult to implement.
ripgrep doesn't even have "level 2" support in its regex engine, nevermind a retracted "level 3" support for custom tailoring. And indeed, most regex engines don't bother with level 2 either. Hell, many don't bother with level 1. The specific reasoning boils down to difficulty in the implementation.
OK OK, so what is this "difficulty"? The issue comes from how regex engines are implemented. And even that is hard to explain because regex engines are themselves split into two major ideas: unbounded backtracking regex engines that typically support oodles of features (think Perl and PCRE) and regex engines based on finite automata. (Hybrids exist too!) I personally don't know so much about the former, but know a lot about the latter. So that's what I'll speak to.
Before the era of Unicode, most things just assumed ASCII and everything was byte oriented and things were glorious. If you wanted to implement a DFA, its alphabet was just consisted of the obvious: 255 bytes. That means your transition table had states as rows and each possible byte value as columns. Depending on how big your state pointers are, even this is quite massive! (Assuming state pointers are the size of an actual pointer, then on x86_64 targets, just 10 states would use 10x255x8=~20KB of memory. Yikes.)
But once Unicode came along, your regex engine really wants to know about codepoints. For example, what does '[^a]' match? Does it match any byte except for 'a'? Well, that would be just horrendous on UTF-8 encoded text, because it might give you a match in the middle of a codepoint. No, '[^a]' wants to match "every codepoint except for 'a'."
So then you think: well, now your alphabet is just the set of all Unicode codepoints. Well, that's huge. What happens to your transition table size? It's intractable, so then you switch to a sparse representation, e.g., using a hashmap to map the current state and the current codepoint to the next state. Well... Owch. A hashmap lookup for every transition when previously it was just some simple arithmetic and a pointer dereference? You're looking at a huge slowdown. Too huge to be practical. So what do you do? Well, you build UTF-8 into your automaton itself. It makes the automaton bigger, but you retain your small alphabet size. Here, I'll show you. The first example is byte oriented while the second is Unicode aware:
$ regex-cli debug nfa thompson -b '(?-u)[^a]'
>000000: binary-union(2, 1)
000001: \x00-\xFF => 0
^000002: capture(0) => 3
000003: sparse(\x00-` => 4, b-\xFF => 4)
000004: capture(1) => 5
000005: MATCH(0)
$ regex-cli debug nfa thompson -b '[^a]'
>000000: binary-union(2, 1)
000001: \x00-\xFF => 0
^000002: capture(0) => 10
000003: \x80-\xBF => 11
000004: \xA0-\xBF => 3
000005: \x80-\xBF => 3
000006: \x80-\x9F => 3
000007: \x90-\xBF => 5
000008: \x80-\xBF => 5
000009: \x80-\x8F => 5
000010: sparse(\x00-` => 11, b-\x7F => 11, \xC2-\xDF => 3, \xE0 => 4, \xE1-\xEC => 5, \xED => 6, \xEE-\xEF => 5, \xF0 => 7, \xF1-\xF3 => 8, \xF4 => 9)
000011: capture(1) => 12
000012: MATCH(0)
This doesn't look like a huge increase in complexity, but that's only because '[^a]' is simple. Try using something like '\w' and you need hundreds of states.But that's just codepoints. UTS#18 level 2 support requires "full" case folding, which includes the possibility of some codepoints mapping to multiple codepoints when doing caseless matching. For example, 'ß' should match 'SS', but the latter is two codepoints, not one. So that is considered part of "full" case folding. "simple" case folding, which is all that is required by UTS#18 level 1, limits itself to caseless matching for codepoints that are 1-to-1. That is, codepoints whose case folding maps to exactly one other codepoint. UTS#18 even talks about this[1], and that specifically, it is difficult for regex engines to support. Hell, it looks like even "full" case folding has been retracted from "level 2" support.[2]
The reason why "full" case folding is difficult is because regex engine designs are oriented around "codepoint" as the logical units on which to match. If "full" case folding were permitted, that would mean, for example, that '(?i)[^a]' would actually be able to match more than one codepoint. This turns out to be exceptionally difficult to implement, at least in finite automata based regex engines.
Now, I don't believe the Turkish dotless-i problem involves multiple codepoints, but it does require custom tailoring. And that means the regex engine would need to be parameterized over a locale. AFAIK, the only regex engines that even attempt this are POSIX and maybe ICU's regex engine. Otherwise, any custom tailoring that's needed is left up to the application.
The bottom line is that custom tailoring and "full" case matching don't tend to matter enough to be worth implementing correctly in most regex engines. Usually the application can work around it if they care enough. For example, the application could replace dotless-i/dotted-I with dotted-i/dotless-I before running a regex query.
The same thing applies for normalization.[3] Regex engines never (I'm not aware of any that do) take Unicode normal forms into account. Instead, the application needs to handle that sort of stuff. So nevermind Turkish special cases, you might not find a 'é' when you search for an 'é':
$ echo 'é' | rg 'é'
$ echo 'é' | grep 'é'
$
Unicode is hard. Tooling is littered with footguns. Sometimes you just have to work to find them. The Turkish dotless-i just happens to be a fan favorite example.[1]: https://unicode.org/reports/tr18/#Simple_Loose_Matches
[2]: https://www.unicode.org/reports/tr18/tr18-19.html#Default_Lo...
[3]: https://unicode.org/reports/tr18/#Canonical_Equivalents
Very fast, TUI, fuzzing matching, and actively maintained.
Or is it just done :)
0: https://blog.burntsushi.net/ripgrep/#code-search-benchmarks
By ripgrep's dev (https://news.ycombinator.com/item?id=12567484).
There are other reasons to prefer one over the other, but are somewhat more minor.
Here's one benchmark that shows a fairly substantial difference between ripgrep and git-grep and ugrep:
$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
$ git rev-parse HEAD
3b5e1590a26713a8c76896f0f1b99f52ec24e72f
$ git remote -v
origin git@github.com:torvalds/linux (fetch)
origin git@github.com:torvalds/linux (push)
$ time rg '\w{42}' | wc -l
1957843
real 0.706
user 7.110
sys 0.462
maxmem 300 MB
faults 0
$ time git grep -E '\w{42}' | wc -l
1957843
real 7.678
user 1:49.03
sys 0.729
maxmem 411 MB
faults 0
$ time ugrep -r --binary-files=without-match --ignore-files '\w{42}' | wc -l
1957841
real 10.570
user 46.980
sys 0.502
maxmem 344 MB
faults 0
$ time ag '\w{42}' | wc -l
1957806
real 3.423
user 8.288
sys 0.695
maxmem 79 MB
faults 0
$ time grep -E -r '\w{42}' ./ | wc -l
grep: ./.git/objects/pack/pack-c708bab866afaadf8b5da7b741e6759169a641b4.pack: binary file matches
grep: ./.git/index: binary file matches
1957843
real 47.441
user 47.137
sys 0.290
maxmem 4 MB
faults 0
The GNU grep comparison is somewhat unfair because it's searching a whole lot more than the other 3 tools. (Although notice that there are no additional matches outside of binary files.) But it's a good baseline and also demonstrates the experience that a lot of folks have: most just tend to compare a "smarter" grep with the "obvious" grep invocation and see that it's an order of magnitude faster.It's also interesting that all tools agree on match counts except for ugrep ang ag. ag at least doesn't have any kind of Unicode support, so that probably explains that. (Don't have time to track down the discrepancy with ugrep to see who is to blame.)
And if you do want to search literally everything, ripgrep can do that too. Just add '-uuu':
$ time rg -uuu '\w{42}' | wc -l
1957845
real 1.288
user 8.048
sys 0.487
maxmem 277 MB
faults 0
And it still does it better than GNU grep. And yes, this is with Unicode support enabled. If you disable it, you get fewer matches and the search time improves. (GNU grep gets faster too.) $ time rg -uuu '(?-u)\w{42}' | wc -l
1957810
real 0.235
user 1.662
sys 0.374
maxmem 173 MB
faults 0
$ time LC_ALL=C grep -E -r '\w{42}' ./ | wc -l
grep: ./.git/objects/pack/pack-c708bab866afaadf8b5da7b741e6759169a641b4.pack: binary file matches
grep: ./.git/index: binary file matches
1957808
real 2.636
user 2.362
sys 0.269
maxmem 4 MB
faults 0
Now, to be fair, '\w{42}' is a tricky regex. Searching something like a literal brings all tools down into a range where they are quite comparable: $ time rg ZQZQZQZQZQ | wc -l
0
real 0.073
user 0.358
sys 0.364
maxmem 11 MB
faults 0
$ time git grep ZQZQZQZQZQ | wc -l
0
real 0.206
user 0.291
sys 1.014
maxmem 134 MB
faults 1
$ time ugrep -r --binary-files=without-match --ignore-files ZQZQZQZQZQ | wc -l
0
real 0.199
user 0.847
sys 0.743
maxmem 7 MB
faults 16
I realize this is beyond the scope of what you asked, but eh, I had fun.So for a non-trivial file this is in principle subject to the same performance considerations as any other file transfer over TCP.
For a very tiny file, you'll be dominated by the overhead of the setup.
There's all sorts of utilities and such. Emacs was a grand example at the time as well. Lots of better mousetraps.
But when you bounce around to a lot of different machines, machines not necessarily in your control, "lowest common denominator" really starts to rear its ugly head.
That vast majority of my command line concoctions are burned into muscle memory.
Today, I think the base line install of modern *nixes are higher than they were back in the day, but the maxim still applies of working with what they have out of the box.
I have exa and rg and fd all installed but unlearning the find and grep muscle memory is hard.
Occasionally I give the newer stuff a go and then end up stumbling over syntax differences and end up just going back to what I know.
Knowing how to do things the annoying way doesn't mean that has to be the preferred way. Being open to retooling is part of staying relevant
For example, you have your configuration of packages, in the ephemeral cloud somewhere, and you do the really dangerous no good thing of piping through bash with some kind of uuid that's assigned to your account, something like (totally made up url)
curl packman.info/users/aed1242faed60a | bash
And it sniffs the architecture, version of binaries to install, which ones are there, and then puts it into an install directory configured by you.This is like 97% existing things with a little glue and interface polish so you can easily bring in an environment.
There's certainly other ways but the idea remains the same
Nothing wrong with that. There are other ends of the spectrum of "make the things I do often as easy as I can", too. Both work.
It reminds me of my father; when he got in a car that wasn't his, he would NOT CHANGE ANYTHING. You couldn't tell he was in it. Safety issues aside, there's an argument to be made to make it as comfortable for you as you can; seat, mirrors, environment, etc. to minimize any distractions.
I see this too in my (software development) communities; some people like to tailor their development experience to the n'th degree to extract as much personal enjoyment/optimization/etc. out of it as they can. Others like to use whatever they're given and be happy with that. Both work.
Myself, I type for a living so I like to use keyboards I like. I bring my own with me in my "go bag" for when I'm out so I don't have to use the (IMO!) crappy Apple Laptop KB's. I /can/ use it, I just choose not to. Other people either like them, or have learned they don't care enough. All good.
du -sh * | sort -h
to be portable. Got a batch of machines that don't support '-h'.On machines I controlled, I mostly used ksh, but it wasn't available on all machines; I cannot remember if it was the SunOS boxes or the older HP-UX or the Apollos, but there were a few. (csh? Go away. No, just go.)
Nowadays, vim and bash are everywhere I need them to be, even if I have to kludge around some version differences.
My only real gripe about find is the awkwardness of pruning multiple hierarchies. After you've written
find / -path /sys -prune -o -path /dev -prune -o ... -o -type f -exec grep -H WHATEVER {} \;
a few times, and have returned to the previous command to add yet another -o -path ... -prune
tuple, it gets a little old.But it works. Everywhere.
(* that I need it)
Or you could just create a git repo with those executables and pull them to your machines?
The thing is, though, I know find well enough to not notice the terrible UI that much, and I know I can rely on it being everywhere. With fd that isn't true.
So it's hard for me to justify making the move.
Same thing happens with things like the fish and oil shells - I have little doubt their UX is better than Bash's, but Bash is pretty ubiquitous.
Emacs has this problem too, as an Emacs user. The UX is completely alien by current standards, but if you update the defaults you'll break a lot of people's existing configs.
How do you get around backwards compatibility / universality UX roadblocks like this?
And my own systems have automatically synced dotfiles, making it mostly a non issue. (I'm using Syncthing for that)
When writing scripts I usually fallback to traditional shells/commands for compatibilty. Unless I'm really sure I will be the only user.
Where I get hung up is, if I need to keep the traditional syntaxes in my head for scripting, why bother storing another one in my head for interactive use?
...that said, I do use ag and rg for other interactive tools, like cross-project search in Emacs.
The only exception is if there is a specific need for something ripgrep does. Usually it's for speed, but speed isn't always needed.
But the newer grep’s are so much faster! I scoffed initially but after a couple of uses I was hooked. I try to install these new tools in my personal ~/bin on systems I spend much time using.
Then packages (including internal packages) can update their defaults based on the version declared there. Basically a protocol version field but for your Emacs configuration.
Distros probably need a different strategy for improving core utils, though.
One rule of thumb though: use it only for personal use, and stick with it to see if it lives long enough. If you're working with the team, just use Bash.
The cool part is network transparency and forwarding environments and other things that plan9 plays with so that you can work locally, remotely.
[0] https://en.wikipedia.org/wiki/Unix_wars [1] https://en.wikipedia.org/wiki/X/Open [2] https://en.wikipedia.org/wiki/Unix_International [3] https://en.wikipedia.org/wiki/Open_Software_Foundation [4] https://en.wikipedia.org/wiki/POSIX
fd # prints tree of current directory
fd somedir/ # results in an error
find # prints tree of current directory
find somedir/ # prints tree of somedir/For example to find fonts.conf below /etc, with fd you would do:
fd fonts.conf /etc
And with find: find /etc -name fonts.conf
In other words with find the first argument is always the starting point. And leaving it out implies the current directory as the starting point.I have a little mental block, though. It's related to the realities of the stuff I work on. Since I find myself logged into other people systems, keeping the old, standard tools hot in my head does really take some of the load off. It's a pretty common refrain, but it's real and practical when you've got embedded systems, bsds, linuxes, macs, etc. Even the difference between gnu and mac is clunky when I don't practice enough.
For the same reason, with the notable exception of git, I use practically no aliases.
If I could invent a product, maybe it would be one that enables effectively "forwarding" CLIs to a remote host shell.
- very locked down bastions - hosts through a secure remote access VM thing that makes file transfer difficult - random docker containers in EKS (often through both of the above)
Getting good at the basic tools is just unavoidable. I find myself manually typing `alias k = kubectl` a lot though :p
I had smart, experience people tell me not to waste my time using the GNU tools for this exact reason back in the day
Use Homebrew?
It's just so engrained into my muscle memory that I do it without thinking about it most of the time.
And the workaround I found for it is adding a macro on my keyboard (through QMK but can be done with anything) that just types out 'alias ll="ls -lah"\n'.
The old ones must have caused years of wasted time
Standard ‘find’ works great. It finds files. It can filter by any criteria I have ever had to look for and the syntax seems very intuitive to me (maybe I am just used to it). It is flexible and powerful.
I’d love to be told I’m wrong, because I feel like I’m missing something.
Notice that I said "different" UX and not "better" UX. Reasonable people can disagree about whether the newer tools have better UX as an objective fact. Many folks very rightly find it very surprising that these tools will skip over things automatically by default. What is true, however, is that there are a lot of people who do see the UX of these tools as better for them.
As the author of ripgrep, I hear the same thing over and over again: ripgrep replaced their ~/bin grep wrapper with a bunch of --exclude rules that filtered out files they didn't want to search. Because if you don't do that, a simple 'grep -r' can take a really fucking long time to run if you're working on a big project. And guess what: a lot of programmers these days work on big projects. (See previous comment about changes in scale.) So you don't really have a choice: you either write a wrapper around grep so that it doesn't take forever, or you use a "smarter" tool that utilizes existing information (gitignore) to effectively do that for you. That smarter tool typically comes with other improvements, because your simple "grep wrapper" probably doesn't use all of the cores on your machine. It could, but it probably doesn't. So when you switch over, it's like fucking magic: it does what you wanted and it does it better than your wrapper. Boom. Throw away that wrapper and you're good to go. That's what I did anyway. (I had several grep wrappers before I wrote ripgrep.)
Every time these tools are discussed here, people say the same thing: "I don't see the point." It's a failure of imagination to look beyond your own use cases. If all you ever work on are smaller projects, then you're never going to care about the perf difference between ripgrep and grep. ripgrep has other improvements/changes, but nearly all of them are more niche than the UX changes and the perf improvements.
In that spirit, let's see your questions:
1-Once in a life time; 2-Yes;3-No;4-Nothing, see 1st answer.
This is always installed and ready to go on any box I have my dotfiles.
I suppose that is why it is hard for these perfectly-good improvements have a hard time getting traction. Because the older stuff is still so flexible.
[dependencies]
ansi_term = "0.12"
atty = "0.2"
ignore = "0.4.3"
num_cpus = "1.13"
regex = "1.5.5"
regex-syntax = "0.6"
ctrlc = "3.2"
humantime = "2.1"
lscolors = "0.9"
globset = "0.4"
anyhow = "1.0"
dirs-next = "2.0"
normpath = "0.3.2"
chrono = "0.4"
once_cell = "1.10.0"
[dependencies.clap]
version = "3.1"
features = ["suggestions", "color", "wrap_help", "cargo", "unstable-grouped"]
I'm looking to do the opposite. Given a location, recurse it, stat() each file and create the database.
Also file data is available in osquery: https://osquery.io/schema/5.2.3/#file
I guess I can see that, but now you have cache invalidation (someone else linked to Spotlight, which does this as a background process). SQLite files can be larger than any physical medium you can purchase so why not go the distance?
I have yet to find a good solution for linux CLI... something that uses an internal database that is kept up to date with all directory structure changes.
Maybe someone else has seen something cool for this? :D
Anybody know of something like that for linux?
Also, backup files. The fewer irrelevant results, the more useful a tool is.
Also, it's far from the only non-VCS tool that uses VCS ignore files.
rsync --cvs-exclude
tar --exclude-vcs> The tool would want to use .gitignore files because it's useful.
Since we're talking about an open source project, try to keep some empathy for developers that are solving their own problems first and not trying to solve everybody's problems. It's a configurable option, anyway.
I love this but if enough new tools keep doing this I might have to change some of my bash aliases :(
Insanely good and fast programs. Zero regrets.
For a fuzzy finder I recently replaced fzf with peco. I like it better, it's very customizable.
Frequently, I try to submit a link, and it shows up as having been submitted. And I'm quite certain a tool as popular as fd has been featured on hn before. So either, somehow this particular link has never been submitted (doubtful), hn allows resubmitting a link after some amount of time, or the link resubmit prevention logic doesn't apply to certain users?
find . --name this --name that --or
or, for more complex: find . --name this --name that --or --modified 2022-05-20 --and
I have some little personal CRUD apps and this sort of postfix notation works very well for them.I could write something like this but haven't gotten motivated to do it though.
1 - classic command prompt: "D:\>dir /s /b *.jpg > 2.txt" - time 5 seconds (4581 files)
2 - this little gizmo: "D:\>fd -e jpg > 1.txt" - time 1 second (same 4581 files)
Conclusion: I have a new tool dropped in my System32 folder from now on. Thank you David Peter
Chrono hasn't been updated for almost 2 years. Is the issue resolved or is there a security risk in using fd?
But for 'find', the bottleneck tends to be directory traversal itself. It's hard to speed that up outside of the tool. fd's directory traversal is itself parallelized.
The other reason why 'fd' might be faster than a similar 'find' command is that 'fd' respects your gitignore rules automatically and skips hidden files/directories. You could approximate that with 'find' by porting your gitignore rules to 'find' filters. You could also say that this is comparing apples-to-oranges, which is true, but only from the perspective of comparing equivalent workloads. From the perspective of the user experience, it's absolutely a valid comparison.
So I'm glad for these new kinds of CLI tools.
I use vi because I know it exists on every(?) system ever. It's not like I go out of my way seeking vi. I feel the feeling is similar for find. It works. It works well. It works the same on all systems I work on.
Would I go out of my way to install find on my system? Probably not.
If the old tools are working well for you, then keep using them! I used plain grep for well over a decade before writing ripgrep. Hell, sometimes I still use grep for precisely the reason you describe: it is ubiquitous.
Also, not every grep behaves the same. Not even close. Unless you're being paranoid about how you use grep, it's likely you've used some feature that isn't in POSIX and thus isn't portable.
Uniquity and portability aren't "the point." Uniquity is a benefit and portability can be a benefit or a cost, depending on how you look at it.
[1] - https://github.com/BurntSushi/ripgrep/blob/master/FAQ.md#pos...
>If, upon hearing that "ripgrep can replace grep," you actually hear, "ripgrep can be used in every instance grep can be used, in exactly the same way, for the same use cases, with exactly the same bug-for-bug behavior," then no, ripgrep trivially cannot replace grep. Moreover, ripgrep will never replace grep. If, upon hearing that "ripgrep can replace grep," you actually hear, "ripgrep can replace grep in some cases and not in other use cases," then yes, that is indeed true!
I think this statement says it all.