writebuffer(1)
πΎ writebuffer β the manual page, but make it cute
okay bestie, welcome to writebuffer(1) β¨ it's a little program from the General Commands Manual and honestly? it's giving patient queen. it does one thing and it does it slayfully.
πΈ NAME πΈ
writebuffer β write output to devices which don't like constant stopping and starting π«Ά
like fr, some devices are sensitive and you gotta be gentle with them.
β¨ SYNOPSIS β¨
writebuffer [--mlock] [size]
that's it. that's the whole vibe. one optional flag, one optional size, and a whole lot of buffering π
π¦ DESCRIPTION π¦
so here's the tea, bestie π: writebuffer reads data on standard input and writes it to standard output.
but β and this is the main character moment β it does NOT just yeet every little bit straight through. nope. it buffers internally up to size megabytes, and it will only write data when:
- the buffer is at least 75% full π, OR
- there is no more input to fill the buffer π
periodt. that's the whole algorithm. it waits, it accumulates, it releases at the right time. discipline. iconic.
and now the cute part: size may also be suffixed with m, k, or b to indicate that it is in:
- megabytes (
2^20) β that's thembestie - kilobytes (
2^10) β that's thek - bytes β that's the
b, no maths required, just raw little guys π
so you can say what you mean and the numbers stay exactly the numbers they are. no vibes-based rounding here, we're being precise β¨
π‘ why does this exist tho
it is intended for use in situations where many small writes are undesirable for performance reasons, e.g. tape drives πΌ
like, imagine asking a tape drive to stop and start a thousand times a second. the AUDACITY. she would simply pass away. so instead you let writebuffer collect everything up and hand it over in one big gorgeous chunk. respectful. considerate. wife material. π
π OPTIONS π
--mlockβ callsmlock(2)to lock the buffer into memory π
that's it, that's the only flag, and she's thriving. no cap. if you want your buffer pinned in memory and not going anywhere, this is your girl π«Ά
π SEE ALSO π
readbuffer(1)β the other half of the friendship duo π«mlock(2)β the syscall that--mlockis out here calling π«
π reminder bestie: the description says writes happen at 75% full or when there's no more input. not before. not whenever it feels like it. she's consistent and we love that for her.
and that's the whole page, bestie π this was the chiark-backup era, dated 2001-10-21 β so yeah, she's an elder icon, been slaying since before some of us were born ππΈ ily, go buffer something responsibly β¨π¦
π¦ 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