Is it possible to locate exactly that executable
myname
which will be run if passed to command line
> myname
locate
command didn't work as expected, since it returns numerous results. Result should be exactly one, because if you run something, only one file runs. Also, result should take PATH
precedence into account.