readbuffer(1)
π readbuffer β the manual page, but make it slay π
okay bestie, sit down, hydrate, because this one's a lil legend from the chiark-backup universe and it's giving General Commands Manual energy. it's called readbuffer, it's section 1, and honestly? it's the friend who holds your stuff so you don't have to keep stopping and starting. π«Ά
β¨ NAME β¨
readbuffer β read input from devices which don't like constant stopping and starting
likeβ¦ the diva devices. the ones that get cranky if you interrupt them every two seconds. π readbuffer is the emotional support buffer for exactly those.
πΈ SYNOPSIS πΈ
readbuffer [--mlock] [size]
that's it. that's the whole vibe. one optional flag, one optional number, zero drama. π
π¦ DESCRIPTION π¦
so here's the tea, bestie: readbuffer reads data on standard input and writes it to standard output. simple. iconic. no notes. β¨
the magic is what happens in between. it will internally buffer up to size megabytes of data, and it will only read more data when the buffer is at least 75% empty. that's the whole trick β it hoards the data like it's stocking up for winter, and only goes back for more once it's burned through most of what it's holding. π₯
now, about size β it may also be suffixed with m, k, or b to indicate that it is in:
- megabytes (
2^20) - kilobytes (
2^10) - bytes
so you can be like "give me m" or "actually, k" or "no, I want raw b, I'm built different." your call, your main character moment. π
and why would you even do this? because it is intended for use in situations where many small reads are undesirable for performance reasons, e.g. tape drives. tape drives HATE being nibbled at. they want big chunky bites or nothing at all. readbuffer is the bestie that shows up with the big spoon. π
π OPTIONS π
--mlockβ Callsmlock(2)to lock the buffer into memory.
that's the one option, and she's a baddie. instead of letting the buffer get yeeted out to swap, --mlock asks mlock(2) to pin it down in memory so it stays put. fair warning though β locking memory is a real privilege move, and if the system can't do it, that's a mlock(2) situation, not a readbuffer situation. iykyk. π
π SEE ALSO π
writebuffer(1)β the sibling. the other half of the duo. π§mlock(2)β the one doing the actual memory-locking, thank her for her service. π
and that's the page, bestie!! you ate, you understood, you're basically a buffer expert now. π
chiark-backup Β· 2001-10-21 β yeah she's an elder icon, dated 2001-10-21, shipped with chiark-backup, and she still hits. periodt. π β¨π
π¦ where this page comes from
- debian bookworm: chiark-rwbuffer 7.0.0
- debian trixie: chiark-rwbuffer 8.0.1
- ubuntu jammy: chiark-rwbuffer 6.1.2+nmu1
- ubuntu noble: chiark-rwbuffer 7.0.0build2
- ubuntu questing: chiark-rwbuffer 8.0.1
- ubuntu resolute: chiark-rwbuffer 8.0.1build1
- ubuntu stonking: chiark-rwbuffer 8.0.1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms