STDBUF(1)

✨ STDBUF ✨

okay bestie so you found stdbuf β€” it lives in section 1 of the manual (the general commands girlies πŸ’…). Here's the whole vibe.

🌸 NAME 🌸

stdbuf β€” run COMMAND, with modified buffering operations for its standard streams.

πŸ¦‹ SYNOPSIS πŸ¦‹

stdbuf [OPTION]... COMMAND

πŸ’– DESCRIPTION πŸ’–

Run COMMAND, with modified buffering operations for its standard streams.

Like. that's the whole thing. you give it a command and it runs that command, except the buffering on that command's standard streams is doing something different than it would have been doing. slay.


✨ OPTIONS ✨

  • -i, --input <MODE> β€” adjust standard input stream buffering
  • -o, --output <MODE> β€” adjust standard output stream buffering
  • -e, --error <MODE> β€” adjust standard error stream buffering
  • -h, --help β€” print help
  • -V, --version β€” print version

πŸ”₯ EXTRA πŸ”₯

okay this is the part you actually needed, no cap. here's what MODE can be. πŸ‘‘

If MODE is 'L' the corresponding stream will be line buffered. This option is invalid with standard input β€” so like, do not try it on stdin, it is not giving. πŸ™ˆ

If MODE is '0' the corresponding stream will be unbuffered.

Otherwise, MODE is a number which may be followed by one of the following:

  • KB β€” 1000
  • K β€” 1024
  • MB β€” 1000*1000
  • M β€” 1024*1024

and so on for G, T, P, E, Z, Y. In this case the corresponding stream will be fully buffered with the buffer size set to MODE bytes.

NOTE: If COMMAND adjusts the buffering of its standard streams (tee does for e.g.) then that will override corresponding settings changed by stdbuf. Also some filters (like dd and cat etc.) don't use streams for I/O, and are thus unaffected by stdbuf settings.

so basically if your command is out here buffering itself, tee style, she's the main character and she wins. and dd and cat are just built different β€” they don't use streams for I/O at all so stdbuf literally cannot touch them. πŸ’€

⭐ VERSION ⭐

v(uutils coreutils) 0.12.0

🌈 EXAMPLES 🌈

Change stdin buffer size to 512 KiB:

stdbuf [-i|--input] 512K command

Change stdout buffer to line-buffered:

stdbuf [-o|--output] L command

Change stderr buffer to unbuffered:

stdbuf [-e|--error] 0 command

The examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. Please note that, as uutils is a work in progress, some examples might fail.


and that's the whole page babes 🫢 this one's from 2026-09-25, sitting pretty in STDBUF(1) β€” uutils coreutils edition. go buffer something responsibly. mwah. πŸŽ€βœ¨

πŸ“¦ where this page comes from