PATH issue on linux

If PATH is set to ../bin:../sbin:/usr/bin:/usr/local/bin (chunk of path string). Sometime when I try to execute ls command it says ../bin/ls not found. According to my understanding "ls" should be searched in all the path varibales that we set in the PATH varaibale.

Is there any reason for the specific problem? I am having this issue on Linux. Please help me with this.

Thanks in advance,

It might be choking on those relative paths, stopping when it tries to check for ls in a directory that does not exist relative to the current location. Is it possible to make them all absolute paths?

I agree. Using relative paths for the PATH variable is a poor way of handling it.

why we need to set the absolute path? If I am using my own application or binaries I like to set the relative path. But for system binaries definitely I use absolute path.

Because setting the relative path breaks things the moment you change directories and it is a bad idea. You came looking for help. People told you what you are doing is wrong.

The PATH variable is meant to be a static variable. If you choose to override that with a bad decision, by all means, do so. However, you will be the one who has to deal with it. There is no reason to use a relative path in the PATH variable. The entire purpose of the PATH is so that relative paths don't matter as you can call on any binaries in the PATH with shortened commands.

Also, if you MUST use a relative path, and thats rather ridiculous, make your path $PATH:../bin, etc.

However, thats just plain WRONG. You should set it in your path, at the END of the string and never have to worry about which directory you are in.

Thank you so much Mark.

Just before asking the question why, I should have read this article.
What is PATH? -- definition by The Linux Information Project (LINFO)