# grep

65 Hacker News commenters recommended grep and 19 criticized it, November 2025 to November 2026. It was recommended in 12 of 13 months. It meets the Hacker Approved badge rule.

**Verdict:** Fast, decades-old command-line text search that composes well in scripts and agent workflows. Critics say it is lexical and floods context on large codebases.

## Why people recommend it

- Fast on large text (4 comments): "the Linux `find` and `grep` commands usually can find stuff much quicker than any 'accelerated' and 'cached' desktop search" ([source](https://news.ycombinator.com/item?id=49708995)) "grep is better than almost anything else you can use. It's very very fast and efficient" ([source](https://news.ycombinator.com/item?id=50057111)) "grep with LC_ALL=C - is much, much faster than any aggregation tool" ([source](https://news.ycombinator.com/item?id=47542520))
- Composes well in pipelines (4 comments): "Well grep is just better sometimes. Like you want to copy some lines and grep at the end of a pipeline is just easier" ([source](https://news.ycombinator.com/item?id=47541202)) "The ones that survive decades (Make, grep, curl) do one thing and compose well" ([source](https://news.ycombinator.com/item?id=47267519)) "Three tools born in Bell Labs that still power every server, every pipeline" ([source](https://news.ycombinator.com/item?id=47163199))
- Decades-old and stable (4 comments): "I use grep multiple times per day, works great, I've seen no need to change." ([source](https://news.ycombinator.com/item?id=47767517)) "They still work exactly the same, and now even my agents can do it." ([source](https://news.ycombinator.com/item?id=48374122)) "Grep is 50 years old and still does exactly what we need." ([source](https://news.ycombinator.com/item?id=46370461))
- Works well for agents (4 comments): "agents are insanely good at grep. So much so that I've been trying to figure out how to create an llmgrep tool" ([source](https://news.ycombinator.com/item?id=46078341)) "Agents love standing on the shoulders of good crystalized cognition (grep, curl etc)" ([source](https://news.ycombinator.com/item?id=49849726)) "Claude Code would be far less useful without grep, diff, git, head" ([source](https://news.ycombinator.com/item?id=47568107))

## What people warn about

- Lexical; poor at semantic search (2 comments): "Grep can cut through almost any code base. The problem is that grep is lexical. It is dumb." ([source](https://news.ycombinator.com/item?id=50058845)) "grep is pretty poorly suited to semantic search and will only return the most basic of matches" ([source](https://news.ycombinator.com/item?id=49509465))
- Floods context with many matches (2 comments): "it is not very token-efficient as it can return lots of matches, filling up the agent's context" ([source](https://news.ycombinator.com/item?id=50061914)) "Claude reading hundreds of kilobytes of outputs because grep found things in node_modules" ([source](https://news.ycombinator.com/item?id=48176626))
- Slow on huge codebases (2 comments): "Grep is effective for the most part, except for situations like when you have huge codebases" ([source](https://news.ycombinator.com/item?id=47921302)) "running grep through millions of files if you use maildir or a similar format takes forever" ([source](https://news.ycombinator.com/item?id=46902670))
- Flags differ across GNU and BSD (2 comments): "find and grep do similar things but work entirely differently and their args aren't even in the same format" ([source](https://news.ycombinator.com/item?id=46383284)) "`grep -P` kinda annoying. GNU has Perl-compatible regex, and BSD does not." ([source](https://news.ycombinator.com/item?id=47361585))

## Alternatives hackers recommend

- [fzf](https://hackerapproved.com/p/fzf.md): 78 recommend
- [jq](https://hackerapproved.com/p/jq.md): 75 recommend
- [Atuin](https://hackerapproved.com/p/atuin.md): 63 recommend
- [GitHub CLI](https://hackerapproved.com/p/github-cli.md): 49 recommend
- [ImageMagick](https://hackerapproved.com/p/imagemagick.md): 37 recommend

## Cite as

Hacker Approved, "grep", https://hackerapproved.com/p/grep/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
