5 ms·
Personally, I find find(1) to be an utter offender against the Unix philosophy of "doing one thing well". It can do a dozen things or so, and not particularly w
by lou1306 5y ago
Personally, I find find(1) to be an utter offender against the Unix philosophy of "doing one thing well". It can do a dozen things or so, and not particularly well either. (Execute actions? Delete stuff? Look for a string within files?). Just look at this post and how long the find(1) section is wrt. the ones about which(1), whereis(1), and locate(1).
I am sure that well-versed users can achieve wonderful things with it; myself, I either use fd or pipe "du -a" into grep (or rg), and move on with my life.
- toxik 5y ago`fd` seems pretty useful, but I tend to just `find . -name '*whatevs*'`. It's a bit longer, but one less tool to make sure you have available (and find is everywhere), and one less tool to learn. Even just `find . | grep whatevs` is fine.
- gpderetta 5y agoI never bothered to learn all the find options, so find|grep is also my usual goto.
- norvvryo 5y agoPOSIX find is a lot less daunting than GNU if you're looking for somewhere to start. https://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html https://pubs.opengroup.org/onlinepubs/9699919799/utilities/f...
- edgyquant 5y agoMy problem with find -name x is that it’s painfully slow
- toxik 5y agoI think this debate is missing one of my favorites, locate.
- lazyweb 5y agoAgreed. My most common use case for "finding stuff" on linux boxes is me looking for particular strings in clear text files, so I often end up doing "grep string -Ri {/etc,/var} | less". Also, though find seems to be POSIX compliant, I just don't like it's syntax and how flags are handled.
- npteljes 5y agoFor that I like to install ripgrep or `rg` for short, very nice defaults and formats the output nicely too.
- hnarn 5y agoInstalling the tools you prefer is not always an option, but I agree, ripgrep is great.
- alex_smart 5y agoYou can always put some binaries in $HOME/bin.
- hnarn 5y agoYou cannot "always" do this because some of us frequently or occasionally work in environments where external, non-reviewed software simply isn't allowed.