Is it possible to locate exactly that executablemynamewhich will be run if passed to command line> mynamelocate 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.
How to locate exactly that executable, which will be run if it's name entered in command line?
path;executable;locate