Terminal : needs full path to execute a command Let's suppose i have an application in /Applications/MacPorts/KDE4/myapp.app/Contents/MacOS/myapp.

When i use cd to reach the directory 'MacOS' and then issue the command myapp it says command not found.

But when i issue the command with the full path like /Applications/MacPorts/KDE4/myapp.app/Contents/MacOS/myapp it works.

I had the same problem with mysql inside xampp.

Why is that?
bash in Terminal uses the content of $PATH to look for executables. Usually . (for the current directory) is not part of $PATH (primarily for security reasons), to run commands in the current directory type ./myapp.