yes: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/yes - from package: coreutils

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/yes - from package: coreutils

You may install the required package with command apt-get install {package}
Error in other languages:
yes: bevel nie gevind nie
yes: comandă negăsită
yes: comando não encontrado
yes: commande introuvable
yes: command not found
yes: käsku ei ole
yes: không tìm thấy lệnh
yes: komanda nerasta
yes: Kommando nicht gefunden.
yes: kommandot finns inte
yes: komut yok
yes: nie znaleziono polecenia
yes: níor aimsíodh an t-ordú
yes: no se encontró la orden
yes: no s'ha trobat l'ordre
yes: opdracht niet gevonden
yes: parancs nem található
yes: perintah tidak ditemukan
yes: príkaz nenájdený
yes: příkaz nenalezen
yes: команда не найдена
yes: командата не е открита
yes: 命令找不到
yes: コマンドが見つかりません