Can't execute a simple LS command in my terminal?



I have a Mac OS Lion 10.7.3, for some estrange reason, when I go to my terminal, and execute a ls command I get a "command not found error".

I reader somewhere else in this forum about restoring a bash file or the Path. But I can't reach such file (maybe because I'm new to MAC). The fact is that if I can't execute commands, my mac is unuseless to me.

Anyone has any idea about how to fix this? Thanks.


U.S.D.A. Prime
Try this:

1) Open Terminal.
2) At the prompt, type "echo $PATH" (without the quotes, of course) and press enter.
3) Post the results of that command here.

More than likely, you've installed some program that modified the PATH variable or modified some config file (.bashrc, .bash_profile, etc.) and accidentally put "export PATH=something" without doing "export PATH=$PATH:something" instead, completely wiping out the pre-defined PATH locations.

Here's a quick tutorial on changing the PATH variable:

In the meantime, you can still execute an "ls" command -- you just have to tell the Terminal where the ls program resides (hint: it should be in /bin)... instead of doing:
ls this:
/bin/ls the Terminal until you fix your PATH variable.