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.


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 :)
truedelivers error level 0,falseerror level 1.yes && echo True || echo Falsewill always be True.false && echo True || echo Falsewill always be False.Common usage is for tools that ask for permissions and similiar.
yes | cp -ihas the same effect ascp --force(-i: prompt before overwrites).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:So I did - thanks for the correction, edited.
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.