It would be nice to have a collection of modern/faster/saner alternatives to common unix tools and such utilities (made in rust or not) that becomes standard -- or at least easily installable in linux distros and OS X. Not for replacing those tools, but for supplementing them.<p>Thinking of stuff like fd and:<p>ripgrep: <a href="https://github.com/BurntSushi/ripgrep" rel="nofollow">https://github.com/BurntSushi/ripgrep</a> (grep/ag alt)<p>xsv: <a href="https://github.com/BurntSushi/xsv" rel="nofollow">https://github.com/BurntSushi/xsv</a> (csv tool)<p>exa: <a href="https://the.exa.website/" rel="nofollow">https://the.exa.website/</a> (ls)<p>una: <a href="https://github.com/jwiegley/una" rel="nofollow">https://github.com/jwiegley/una</a> (multi-compression utils wrapper)<p>tokei: <a href="https://github.com/Aaronepower/tokei" rel="nofollow">https://github.com/Aaronepower/tokei</a> (loc stats)<p>And of course this:
<a href="https://github.com/uutils/coreutils" rel="nofollow">https://github.com/uutils/coreutils</a>
I'm sorry to be something of a negative Nancy - and I'm sure I'm a corner case - but this is not really an alternative to find. It's an alternative for your editor's fuzzy find and a better version of shell globs.<p>The absense of -delete, -execdir, -mtime, and the ability to chain multiple patterns together for the non-trivial use-cases, means this is practically useless in most places where `find` is used in day-to-day work. Not to mention the "opinionated" choice to ignore a dynamic set of files and directories (what files were skipped? In any directory, or just git repos? Does it back track to find a git directory and .gitignore? Does it query out to git? Does it respect user/global .gitignore settings? Does it skip Windows hidden files from a unix prompt, or a dotted file when on Windows?), the options hidden behind two separate flags.<p>Perhaps it's just because I'm used to using 'find', but when I reach for it, it's because I need -delete or -execdir, or I'm writing automation that really needs -mtime and chained patterns.<p>So, I would suggest that you don't call this an alternative to find; it's not. A replacement for shell globs, sure. A replacement for poor file finding in text editors, OK. Just... not find.<p>EDIT: Oh, 'fd' also already exists. <a href="https://github.com/knu/FDclone" rel="nofollow">https://github.com/knu/FDclone</a>
Yes I'll agree with the people who say that this isn't a drop in replacement (fewer features and different syntax) but I also just don't care. fd's defaults are brilliantly simple and just plain make sense. Yes I can use find but I always, always end up looking up an example. fd was simple enough that I very quickly figured it out by trial and error. And it really is fast.<p>Thank you sharkdp -- really nicely done. Appreciated.
My main usecase for find is not only finding files, but to do actions on them through -exec.<p>Unless I’m missing something, that’s not supported with this tool.
Any plan to provide find compatibility for drop-in replacement? My find/locate usage patterns are not worth learning new sophisticated tool for 5sec speedup once a week, and I suspect that I’m not alone. This is the main problem of new tools — not repeating the old-familiar style makes it unattractive for non-aggressive users.<p>Side question: why is speed important? Which tools use fd to gain required performance?
IMHO, there is no demand for this kind of "improved tools collection". In the programming world, the programmer creates a sweet working environment to fit his needs by creating many alias and functions, by customizing his desktop. He complains that the tools collection is complex but has no opportunity to progress because he rarely uses them directly. In the "sysop" world, the user is always logged remotely on varying machines. There is no incentive to install and customize a machine because he will quickly have to work on another machine without this customization.<p>I think we need a saner alternative to the man pages of the classic unix tools collection. Something less focus on the seldom used options, but more focus on the traps to avoid and the useful tricks. The bad quality of documentation is more annoying than the incongruous syntax of tools.
For me, the speed of find and grep is sufficiently never a concern, so I do not find these speedy alternatives sufficient to compensate for its non-universality. And when the speed of grep and find do become a concern, I would think the issues are somewhere else -- like have 10s thousands of jpg files scatter everywhere that you need to find in the first place. When issues are somewhere else, replacing it with <i>better</i> tool only hides and makes the problem worse.
It's strange to advertise this as a find(1) replacement when it covers maybe 1% of find(1) use cases.<p><pre><code> find -type d -empty -delete
find -type l -exec readlink -f {} +
</code></pre>
etc. are not covered at all.
I've found that fzf has replaced all uses of find for me except in scripts. fzf has the benefits of being bound to a single key binding and showing me results as I type, rather than after the command runs.
It's exciting to see so many problem solvers use Rust to improve core linux utilities. I've been using Exa as an 'ls' replacement for some time now. 'fd' looks promising but has room to grow, still. Finding a file and then acting upon it is an important feature that ought to be addressed.
hey david, you can omit the 'static lifetime in the root directory string declarations if you want!<p><a href="https://github.com/rust-lang/rfcs/pull/1623" rel="nofollow">https://github.com/rust-lang/rfcs/pull/1623</a>
> Ignores patterns from your .gitignore, by default.<p>Do you need to be in the current git directory for this to happen, or all git dirs that happen to be traversed?<p>And are you using an NFA based regex engine?