Question

After somewhere searching finally not getting what i want.

I am working on some embedded board with linux system. And many users access it by telnet.So each user suppose copy some binary somewhere and executed like ./binary.So i can see this process running by simply ps command but from where it's running i don't know.

somewhere found that, use which command but as per my understanding(if i am not wrong) which command find only path of that binary whether it's currently executing or not.

And what if multiple users copied same binary in different path?

Also looked another solution use readlink but limited busybox binary supported in my target board. So readlink is not there.

One another solution like

file /proc/"proess id"/exe but here file command not present because of custome linux in my board which contain only limited functionality and binary.

So any other solution is there?

Was it helpful?

Solution

Try ls -l /proc/"proess id"/exe. ls utility from GNU coreutils shows links with -l option, but I don't have exact information about ls from busybox.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top