Linux weird problem touch : command not found?

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.

And I didn't find touch in the /bin dir, how can I reinstall "touch"?


/bin/touch is in the coreutils package. You can install this package by running:

yum install coreutils

If yum reports that the package is already installed, then you can run the following commands to reinstall it:

rpm -e --justdb --nodeps coreutils
yum install coreutils

The rpm command removes the rpm database entry for coreutils, which will allow yum to install it again.

vi can be installed from either the vim-minimal or vim-enhanced packages.