Linux weird problem touch : command not found

linuxtouchvi

I occurred a really weired problem, which is touch : command not found.

I was going to create a blank file, so I type the touch command which didn't work.

I'm running centOS 5.

Any ideas?

BTW: the vi command also not found.

Best Answer

You probably temporarily messed up your path. It may be enough to do:

exec /bin/bash

Then you can try touch, etc. to make sure things are normal.

If that doesn't work, the PATH definition is wrong in one of your system files.

Related Question