3 ms·
It's strange to advertise this as a find(1) replacement when it covers maybe 1% of find(1) use cases. find -type d -empty -delete find -type l -exec readli
by majewsky 9y ago
It's strange to advertise this as a find(1) replacement when it covers maybe 1% of find(1) use cases.
find -type d -empty -delete
find -type l -exec readlink -f {} +
etc. are not covered at all.
- raverbashing 9y ago1% of possible cases but 90% of actual usage I'd say
- majewsky 9y agoThen you have a different usage pattern than I do. For simple name globbing, I usually just use shell globs, e.g. ls src/**/*_test.go It might be marginally slower than find or FD, but it usually doesn't matter because I usually deal with a small number of files.
- lkbm 9y agoOh, [star][star]! What I usually end up doing is: 1. ls [star]/foo 2. ls [star]/[star]/foo 3. ls [star]/[star]/[star]/foo 4. "I guess it doesn't exist." [star][star] would have been useful to know. But now I have fd, so that's nice. :-) Edit: Silly markdown.
- raverbashing 9y agoI just tried this and: ls (some dir)/**/*.py zsh: argument list too long Yeah, I'll keep using find
- lkbm 9y ago100% of the time I consider using find, what I want is "dir/s foo". Step 1 is decide whether it's worth re-looking-up how to do it. I rarely remember--sometimes I think the man page will be helpful. It's not. ("man find" mentions "-name", which gives me an "illegal option" error. Maybe it's "--name"? Nope. Maybe it's "-n"? Nope. Maybe it's "-f"? Oooh, you have to do path and then add in options, unless those options are -H, -L, -P, -E, -X, -d, -s, or -x, in which case they go before the path? Of course, how silly of me.) "fd filename" does exactly what I want, and what I'd expect. Gave me what I wanted on the first try. For my purposes, find is fully replaced, with something actually usable. Small, simple utils are nifty.