Skip to content
Julia Evans

Why pipes sometimes get "stuck": buffering

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 original on jvns.ca
0
0

2 comments

techfan421h ago

This is a really insightful piece. The data backs up what I've been seeing in the industry.

devops_sam45m ago

Agreed. Would love to see a follow-up with more recent numbers.

curious_reader2h ago

I'm not sure the conclusion holds for smaller teams. Would be interesting to see this broken down by company size.

Related

Liked this? Start your own feed.

Your own feed is waiting.
0
0