So, basically I was messing up with minix and qemu and I messed up too much.
me@meplepl ~ $ which
bash: /usr/bin/which: cannot execute binary file: Exec format error
me@meplepl ~ $ file /bin/which
/bin/which: Minix-386 executable
I have the same problem with awk and somehow ssh. It turns out I somehow replaced my binaries with those from minix? Is there easy fix or I have to go back to my previous backup?