STDBUF(1)
๐ STDBUF(1) โ like, the manual page but make it make sense ๐
okay bestie, gather round, because this one is genuinely a little icon. it's a User Commands page, it's called stdbuf, and it is about to fix your buffering problems for you. no cap. โจ
๐ NAME ๐
stdbuf โ run COMMAND, with modified buffering operations for its standard streams.
yes it's literally that. it runs your command and messes with how its streams buffer. main character energy for pipes. ๐
๐ฆ SYNOPSIS ๐ฆ
stdbuf OPTION... COMMAND
โจ DESCRIPTION โจ
Run COMMAND, with modified buffering operations for its standard streams.
Mandatory arguments to long options are mandatory for short options too. (yes, that's a real sentence, and yes, it applies to you, bestie. taking notes ๐)
-i,--input=MODEโ adjust standard input stream buffering-o,--output=MODEโ adjust standard output stream buffering-e,--error=MODEโ adjust standard error stream buffering--helpโ display this help and exit. slay, we love a quick exit ๐--versionโ output version information and exit
Now let's talk about what MODE actually is, because this is the part where people get confused and I refuse to let that be you.
- If MODE is
'L'the corresponding stream will be line buffered. This option is invalid with standard input โ so don't even try it there, it's not it. ๐ - If MODE is
'0'the corresponding stream will be unbuffered. nothing held back, we're going straight to output. periodt. - Otherwise MODE is a number which may be followed by one of the following:
KB1000,K1024,MB1000*1000,M1024*1024, and so on forG,T,P,E,Z,Y,R,Q. Binary prefixes can be used, too:KiB=K,MiB=M, and so on. In this case the corresponding stream will be fully buffered with the buffer size set to MODE bytes. it's giving precision. it's giving math. we love her. ๐งฎ๐
โ ๏ธ NOTE: If COMMAND adjusts the buffering of its standard streams (teedoes for example) then that will override corresponding changes bystdbuf. Also some filters (likeddandcatetc.) don't use streams for I/O, and are thus unaffected bystdbufsettings. so likeโฆ sometimes your fave just flat out ignores you. it's not personal. it's I/O. ๐ญ
๐ Exit status: ๐
125โ if thestdbufcommand itself fails126โ if COMMAND is found but cannot be invoked127โ if COMMAND cannot be found-โ the exit status of COMMAND otherwise
(that little - dash is doing so much heavy lifting and nobody ever thanks her. thank her.) ๐ซถ
๐ EXAMPLES ๐
tail -f access.log | stdbuf -oL cut -d ' ' -f1 | uniq
This will immediately display unique entries from access.log.
like โ immediately. no waiting around for some buffer somewhere to decide it feels like flushing. go off, honestly. ๐ฅ
๐ BUGS ๐
On GLIBC platforms, specifying a buffer size, i.e., using fully buffered mode will result in undefined operation.
undefined operation, bestie!! that's the scary kind!! so like, know what you're doing before you hand her a byte count. ๐
๐ AUTHOR ๐
Written by Padraig Brady.
(we stan. ty for your service. ๐)
๐ง REPORTING BUGS ๐ง
- Report bugs to:
bug-coreutils@gnu.org - GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
- General help using GNU software: <https://www.gnu.org/gethelp/>
- Report any translation bugs to <https://translationproject.org/team/>
they want your bug reports. like genuinely. it's not a trap. tell them everything. ๐
โญ SEE ALSO โญ
- Full documentation: <https://www.gnu.org/software/coreutils/stdbuf>
- or available locally via:
info '(coreutils) stdbuf invocation'
iykyk. ๐โจ
Packaged by Ubuntu (9.10-1ubuntu2) Copyright ยฉ 2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.</purlple>
(fr fr, no warranty. read the license. it's giving legally binding but make it cute. ๐)
okay and that's the whole vibe, bestie โ this was GNU coreutils 9.10, dated August 2026, and honestly? she ate. pop off, stdbuf. ๐
๐๐ธ
๐ฆ where this page comes from
- ubuntu stonking: gnu-coreutils 9.10-1ubuntu2 ยท GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms