5 ms·
I’ll have to try this out. I admit that most of my uses of find looke like find . | grep what_i_am_looking_for Because I can never remember how finds argument
by travisgriggs 2y ago
I’ll have to try this out. I admit that most of my uses of find looke like
find . | grep what_i_am_looking_for
Because I can never remember how finds arguments work. I like the integrated xargs like behavior as well.
One thing I did not see in there was how fd handles symlink directory traversal? Searched the whole readme for it, and only found options to match on symlinks or not.
- xiphias2 2y agoThat's basically rg
- diziet_sma 2y agofd --help | rg link -C 10 Set -L --follow to descend into symlinked directories. The default is to not.
- bee_rider 2y agoI’m finding that I use locate more and more for this sort of thing. Of course, it produces a lot more output, because it looks at the whole system. But, it is still much faster than find because it runs on some kind of index or something, and it is easy enough to grep out the directory I’m interested in, if needed.
- gcmeplz 2y agolocate is nice, but I think that on most distros its index is only updated once/day (unless you adjust the cron job that updates it more often). Most of the times I'm trying to find something, I haven't modified it recently, but it can definitely lead you astray.
- silisili 2y agoOne can just run 'sudo updatedb' to refresh it. Super fast if it's already on a schedule. I think mine is set to update every system update, so I just have a habit of running that before I use locate each time.
- VTimofeenko 2y agoCheck out `curl cht.sh/${utility_name}`. It will print a short help page with some common examples
- hnlmorg 2y agoShameless plug: Or just press F1 if you use my shell. https://murex.rocks/user-guide/interactive-shell.html#autocomplete-preview https://murex.rocks/user-guide/interactive-shell.html#autoco...
- helsinki 2y agoHm, I feel like I have roughly the exact same functionality with zsh and some various plugins, including the meta editing experience shown in your demo video ($EDITOR) via Kitty and/or WezTerm.
- moozilla 2y agoWhich plugins are you using? I've been looking to upgrade my zsh experience so some suggestions would be helpful.
- hnlmorg 2y agoWith some effort it’s possible to bend zsh to any workflow, but there’s a lot to be said for having sane defaults. The other value add for alternative shells like my own is better support in the language for handling structured data (is not treat everything as a dumb byte stream). Ultimately though, productivity is all about familiarity and if you’re also super efficient in zsh then I’m not going to try and convince you that some shiny new tool is better.
- kjkjadksj 2y agoWhy pipe to grep instead of applying the pattern in the find command?
- layer8 2y agoIn that case, you might as well just use grep -r, or its alias rgrep. And then remember that it supports --include=GLOB, --exclude=GLOB, and --exclude-dir=GLOB. (That’s GNU Grep, just to be clear: https://www.gnu.org/software/grep/manual/grep.html#File-and-Directory-Selection https://www.gnu.org/software/grep/manual/grep.html#File-and-...)
- yread 2y agoErr no? grep searches contents and op is looking in filenames
- ltbarcly3 2y agonope, not remotely the same thing
- deleted 2y ago[deleted]
- forinti 2y agoNot the same thing, but thank you. I've been using "find . -type f -exec grep -i {} /dev/null \;" without looking for a better solution and here it is.
- timewizard 2y agoYou're just using the unix pipeline as it was intended. I always prefer this over having to remember a bunch of obscure command line switches.