3
votes
1answer
360 views

Linux: find first result from specified search path

If I have a colon-separated path list, much like $PATH, but not neccessarily $PATH. I want to search that list for a specific file name. However, I only want the first matching path. I have ...
3
votes
2answers
645 views

How can I “which <binary>” in cmd.exe

Is there a way to quickly determine where a binary (that the %PATH% variable points to) is located. That is something that would do the equivalent of which perl in a traditional unix shell. I ...
1
vote
2answers
338 views

“which” Program Requires Shell Refresh to See Newly Installed Programs?

Why does the Linux program which require you to refresh the shell (e.g. type tcsh in the terminal) to see new programs installed in your path?? I was baffled why I couldn't access a program, which ...
15
votes
3answers
5k views

What is Windows' equivalent of the “which” command in Unix? Is there an equivalent PowerShell command?

In Linux, we have the "which" command to find out the path of an executable. What is its Windows equivalent? Is there any PowerShell command for doing that?
7
votes
4answers
4k views

in Windows command line: How to know the path of a command?

I have some program in many places (it is the java command).. I am starting this command from CMD. the problem is, I need to know exactly the path of the java command being run.. (If you know unix, I ...