Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah — probably it doesn't matter how fast the yes command is. It will be faster than the program prompting for y/n.

FreeBSD's was nice and simple until someone decided to make it faster in r319897.



The yes command will repeat whatever string you give it, so it's useful for load/traffic testing. Speed helps this particular use-case.


That's a possible secondary use, but not really what the command is for.

Why not just use /dev/zero or /dev/urandom for generating load?


Because the yes command will repeat whatever string you give it. If you need to parse the incoming load in a certain way, /dev/{zero,urandom} won't be suitable.


yes will repeat arbitrary data (including binary).




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: