Earlier quoted context omitted.
Because you'll have to pipe into xargs and then you have issues with spaces in file names, sometimes-exec is simpler for a single command.
You can use -print0 and -0 to handle spaces. find . -name \*.java -print0 |xargs -0 grep something
Show HN: A simple, fast and user-friendly alternative to find, written in Rust
181–190 of 225 posts
Re: Show HN: A simple, fast and user-friendly alternative to find, written in Rust
#182I'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. 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-d…
> 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. I completely agree with that. And would in fact go slightly further: one of my huge annoyances with `find` is that I can never get alternative (-o) non-trivial patterns to work correctly, I think there's…
find . -type f \( -name \*.c -o -name \*.cc -o -name \*.cpp \)Re: Show HN: A simple, fast and user-friendly alternative to find, written in Rust
#183Earlier quoted context omitted.
What surprises me is that even after 25 years of the Internet, we cannot bring in new tools into our environment (be it a remote box I ssh into or a trimmed down docker image) on the fly. The popular package management tools rely heavily on FHS and like to install stuff into directories that require root permission. Imagine if there was a tool that could download binaries of modern tools from a certain repo and insta…
Nix[1] says hi. [1]: https://nixos.org/nix/
Re: Show HN: A simple, fast and user-friendly alternative to find, written in Rust
#184Re: Show HN: A simple, fast and user-friendly alternative to find, written in Rust
#185Earlier quoted context omitted.
> 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. I completely agree with that. And would in fact go slightly further: one of my huge annoyances with `find` is that I can never get alternative (-o) non-trivial patterns to work correctly, I think there's…
It took me a while to figure out `-o`. You need to use `\(` `\)` find . -type f \( -name \*.c -o -name \*.cc -o -name \*.cpp \)
Re: Show HN: A simple, fast and user-friendly alternative to find, written in Rust
#186I 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.
Re: Show HN: A simple, fast and user-friendly alternative to find, written in Rust
#187It 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. Thinking of stuff like fd and: ripgrep: https://github.com/BurntSushi/ripgrep (grep/ag alt) xsv: https://github.com/BurntSushi/xsv (csv tool)…
httpie: https://github.com/jakubroztocil/httpie (cURL for humans) Httpie is my goto http cli for all systems. Pretty much PostMan (that a lot of ppl use for no reason) but without annoying UI and on a single line. Formats JSON and colors it right in the terminal as well. Has a super nice query, header and post body syntax. Works well with sessions and cookies.
I can't see anywhere in the httpie docs about capturing variables from and/or running tests on the HTTP responses - it's an extremely powerful feature of Postman when you're debugging non-trivial HTTP flows.
Re: Show HN: A simple, fast and user-friendly alternative to find, written in Rust
#188I'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. 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-d…
> Not to mention the "opinionated" choice to ignore a dynamic set of files and directories That has bitten me a few times when using `rg`. Sometimes (but not often enough to remember the switch) I want to grep a lot of binary .so files for a string and am left wondering why nothing was found before just replacing rg with grep. Just calling `TOOL PATTERN` without switches is the most intuitive thing, and there I agree…
Protips: `rg -u` stop looking at `.gitignore` files. `rg -uu` searches hidden files/dirs. `rg -uuu` searches binary files.
Re: Show HN: A simple, fast and user-friendly alternative to find, written in Rust
#189I'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. 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-d…
> fd .py | xargs stat
Re: Show HN: A simple, fast and user-friendly alternative to find, written in Rust
#190It 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. Thinking of stuff like fd and: ripgrep: https://github.com/BurntSushi/ripgrep (grep/ag alt) xsv: https://github.com/BurntSushi/xsv (csv tool)…
ack: https://beyondgrep.com/
The only reason for using ack these days is if you’re already invested in a Perl workflow and can use some of the Perl magic powers, and don’t care about comparatively poor performance. That’s not many people.