Why pipes sometimes get "stuck": buffering

·Julia Evans··

Here’s a niche terminal problem that has bothered me for years but that I never really understood until a few weeks ago. Let’s say you’re running this command to watch for some specific output in a log file: tail -f /some/log/file | grep thing1 | grep thing2 If log lines are being added to the file relatively slowly, the result I’d see is… nothing! It doesn’t matter if there were matches in the log file or not, there just wouldn’t be any output. I internalized this as “uh, I guess pipes just get...

Read full article →

Related Articles

Show HN: Tilde.run – Agent sandbox with a transactional, versioned filesystem
ozkatz · Hacker News · 2d ago
Computer Use is 45x more expensive than structured APIs
palashawas · Hacker News · 3d ago
Bun is being ported from Zig to Rust
SergeAx · Hacker News · 4d ago
Reverse-engineering the 1998 Ultima Online demo server
notsentient · Hacker News · 2d ago
RaTeX: KaTeX-compatible LaTeX rendering engine in pure Rust
atilimcetin · Hacker News · 4d ago