There's also fd[1], which is written in rust and is super fast.<p>[1] <a href="https://github.com/sharkdp/fd" rel="nofollow">https://github.com/sharkdp/fd</a>
First, I have a problem with rewriting common utilities (like find, which also supports more search functionality than regex) while changing flags (e.g. `i` to ignore case to `s` - incidentally, grep also accepts `i` to ignore case). It makes it harder to explore the system interactively, particularly for beginners.<p>Second, the utility already exists, and this version is significantly slower:<p><pre><code> > time ./ff '.*.cpp' ~/src/ > /dev/null
real 0m1.195s
user 0m0.488s
sys 0m0.671s
> time find -E ~/src/ -type f -regex '.*.cpp' > /dev/null
real 0m0.880s
user 0m0.407s
sys 0m0.425s
</code></pre>
But wait! This is a totally unnatural use of find. If we use find like users actually do, we get even better performance:<p><pre><code> time find ~/src/ -name '*.cpp' > /dev/null
real 0m0.553s
user 0m0.181s
sys 0m0.363s
</code></pre>
Hardly scientific. But it begs the question: who is this for?
Why do "convert everything to rust" people appear to prefer solving already solved problems instead of focusing on problems we could not solve but are now possible thanks to Rust?
Someone already opened an issue to make it ignore files specified in `.gitignore`. A `fd` is doing it, `rg` is doing it, now someone wants this to behave the same. I don't know. Maybe I have some really strange expectations but when I want to find a file and nothing comes up as a result, I want to be sure nothing is there. And I want to be sure without remembering bunch of command line options or setting up aliases everywhere I log in because, guess what, maybe they invented some other file with patterns to ignore. Is it only me?
Here's a simple version of a file find command utility, written in D, minimal features, may be useful for beginners to D:<p>Command line D utility - find files matching a pattern under a directory:<p><a href="https://jugad2.blogspot.com/2016/10/command-line-d-utility-find-files.html" rel="nofollow">https://jugad2.blogspot.com/2016/10/command-line-d-utility-f...</a><p>The D stdlib's dirEntries() function makes the job easy, for a basic one like this.
That’s fun! I needed something like this and wrote my own a while ago. Choose to implement it with a different algorithm though instead of regex.<p><a href="https://github.com/kbacha/file-finder" rel="nofollow">https://github.com/kbacha/file-finder</a>