I came across this in man cat
(GNU/Linux).
The manual simply says -u (ignored)
without explaining why.
Out of curiosity I searched on Google but it seems no one asked this before.
Then I looked at other implementations of cat
.
I noticed
Apple's cat also implements this option (see cat.c). In the source code it says
...
case 'u':
setbuf(stdout, NULL);
break;
...
I guess this option means 'unbuffered'. What is the inteneded use of this option? Why is it there and why is it ignored? I think there must be some reason for that.
It is a POSIX compliant option for Unix/Linux.
GNU cat
does this automatically and there is no way to turn it off. When specified, it is accepted but ignored because it has no effect on the behavior.
More details cat(1)
:
-u
Write bytes from the input file to the standard output without delay as each is read.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With