Which Linux command or utility is simple, powerful, and surprisingly unknown to many people or used less often?
This could be a command or a piece of software or an application.
For example I’m surprised to find that many people are unaware of Caddy, a very simple web server that can make setting up a reverse proxy incredibly easy.
Another example is fzf. Many people overlook this, a fast command-line fuzzy finder. It’s versatile for searching files, directories, or even shell history with minimal effort.


yesThe most positive command you’ll ever use.
Run it normally and it just spams ‘y’ from the keyboard. But when one of the commands above is piped to it, then it will respond with ‘y’. Not every command has a true -y to automate acceptance of prompts and that’s what this is for.
Also, you can make
yesreturn anything:yes noI… did not know that. Thanks, TIL!
That’s really neat but also seems like it could be quite dangerous in a lot of use-cases!
Absolutely, but when you do need it, it’s brilliant.
What’s the syntax here? Do I go
I’m not sure if I’ve had a use case for it, but it’s interesting.
That will just wait for
commandto finish properly and then runyes.What you want to run is
yes | command, so it spams the command with confirmations.Also my favourite way to push a core to 100% CPU
yes > /dev/nullhow is that better than
cat /dev/zero > /dev/nullor
while true; do :; doneWho said it was better? It’s just my favourite.
Like my favourite shirt, it’s no better than the others, but it brings me a little joy :)
For some cases I use “|| true”.
The idiom accepts that the preceding command might fail, and that’s OK.
For example, a script where mkdir creates a directory that might already exist.
mkdir -pwill not complain if the dir existsRight, it was an example of a pattern. In that case, -p could be used.
I figured as much. Just wanted to show another option.
Sorry, I should have explained that. it’s
command | yesyes|command- Eg,yes|apt-get update(Not a great example since apt-get has -y, but sometimes that fails when prompting for new keys to accept)Edit: I got it backwards, thanks @lengau@midwest.social for the correction.
You’ve got it backwards - you need to pipe the output of
yesinto the input of the command: