4 ms·
Interesting, but is there actually a practical benefit of having GigaBytes of the word yes being generated or is this all just optimisation porn?
by dnel 9y ago
Interesting, but is there actually a practical benefit of having GigaBytes of the word yes being generated or is this all just optimisation porn?
- kqr 9y agoI thought about that too, but I suspect it may be some sort of race to idle thing.
- unkown-unknowns 9y agoSomeone else ITT pointed out a good reason: > yes can be used to generate arbitrary repeated data for testing or whatever, so it is useful to be fast
- dcosson 9y agoSeems like it might even be better if yes was rate limited to a couple of lines per second or less. It would be more than enough for its intended use and when users inevitably run it in a shell to see what it does it wouldn't generate tons of output. It seems like a violation of "do one thing well" to use it for generating data for testing, isn't dd and /dev/zero a better way to do that?