2018-11-27 13:23:15 +00:00
|
|
|
# stdbuf
|
|
|
|
|
|
|
|
> Run a command with modified buffering operations for its standard streams.
|
2025-01-18 18:45:33 +05:30
|
|
|
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/stdbuf-invocation.html>.
|
2018-11-27 13:23:15 +00:00
|
|
|
|
2023-08-09 07:29:02 +02:00
|
|
|
- Change `stdin` buffer size to 512 KiB:
|
2018-11-27 13:23:15 +00:00
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`stdbuf {{[-i|--input]}} 512K {{command}}`
|
2018-11-27 13:23:15 +00:00
|
|
|
|
2023-08-09 07:29:02 +02:00
|
|
|
- Change `stdout` buffer to line-buffered:
|
2018-11-27 13:23:15 +00:00
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`stdbuf {{[-o|--output]}} L {{command}}`
|
2018-11-27 13:23:15 +00:00
|
|
|
|
2023-08-09 07:29:02 +02:00
|
|
|
- Change `stderr` buffer to unbuffered:
|
2018-11-27 13:23:15 +00:00
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`stdbuf {{[-e|--error]}} 0 {{command}}`
|