grep

Classic Unix command-line utility for searching text with regular expressions.

HN commenters value grep for being fast and flexible with no indexing step12, and for coming preinstalled, so it is there on any server they log into.34 The main caveat is that a recursive grep also scans binary files and can be slow5, and some commenters switch to ripgrep for very large files.6
The HN verdict, written from 6 cited comments
5recommend
0warn against
Jan 15, 2026first mention
Oct 12, 2026latest mention
Nov 25 – Oct 26
Used forfor code searchfor remote serversfor AI agent contextsearching codesearching source code

Why people recommend it

Simple and sufficient · 3

Commenters call it a simple tool that is good enough for everyday searching.

“I use grep, emacs, and I don't feel like I have anything that needs mitigation.”

Show 1 more

“I use grep a lot in an ad hoc manner on really large files I switch to rg.”

Speed · 2

Described as very fast, even faster than IDE search when there is no code index.

“In general, in my experience, grep is better than almost anything else you can use.”

“grep is great. It comes pre-installed on your OS.”

Preinstalled everywhere · 2

It ships with the OS, so it is available on random servers where replacements are missing.

“grep is great. It comes pre-installed on your OS.”

“the closer my setup is to the default one, the better”

No indexing · 1

It needs no indexing pass and is never out of date.

“In general, in my experience, grep is better than almost anything else you can use.”

Caveats and dissent

Slow recursive scans · 1

`grep -r` also scans binary files rather than just source files, which can make it very slow.

“grep is great. It comes pre-installed on your OS.”

Very large files · 1

One commenter switches to ripgrep for really large files.

“I use grep a lot in an ad hoc manner on really large files I switch to rg.”

Often compared with

All comments 7

“In general, in my experience, grep is better than almost anything else you can use.”

“I use grep, emacs, and I don't feel like I have anything that needs mitigation.”

“grep is great. It comes pre-installed on your OS.”

“I use grep a lot in an ad hoc manner on really large files I switch to rg.”

“the closer my setup is to the default one, the better”

Threads where it came up

Data: grep.json. Quotes are verbatim; the verdict and theme labels are written by a model from these comments, and every clause links to its sources.

Keyboard shortcuts
j / kNext / previous item
o or EnterOpen selected item
/Search
g hHome
g tTop
g rRising
g cCategories
tToggle dark mode
?This help