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.
|
feedback
|
This question came from our site for professional and enthusiast programmers.
|
You probably temporarily messed up your path. It may be enough to do:
Then you can try If that doesn't work, the PATH definition is wrong in one of your system files. | |||
|
feedback
|
|
Try to find the command manually. It will be a file named touch and on my current system it is /bin/touch. You can find it by with locate touch or even find / -name touch. If you find it with locate and it isn't where it says that it should be, that could mean that it was recently moved or deleted. Once you find the command, make sure that it is in your PATH with echo $PATH. If all this works, try specifying the path and command together (i.e. /bin/touch foo). You may also want to check your aliases to see if there is anything there messing things up. As an observation, you mention that vi isn't working either. In my system, both vi and touch are in /bin and not /usr/bin. Check to see if you are able to run other commands from there. | |||
|
feedback
|
|
Try the following command:
It may tell you that the
| |||
feedback
|
echo $PATH, what do you see? Or try "/bin/echo $PATH" – Stephen May 8 '10 at 2:56