0
votes
2answers
54 views

Can I use `which` command for partial match?

I want to find all programs with name like "gcc", "gcc-4.2", "gcc-4.9" and so on. To find all binaries I tried with which -a gcc*. But "*" is not recognized as 'any' with which command. Is there ...
2
votes
3answers
656 views

How do I change the default version of a unix executable?

I currently have two versions of the same executable installed on my OSX machine: one sits in usr/bin, and the other is a Macports installation. When I run which, the terminal returns the location to ...
2
votes
6answers
2k views

(Unix/Linux) How to execute different commands with same name?

I have a two seperate files on my computer, which execfile /usr/local/bin/ /usr/bin/ so, i have two files with the same name in two different directories. How can I specify exactly which command ...
15
votes
4answers
6k views

which/whereis differences

What's the difference between which and whereis ?
16
votes
3answers
5k views

Powershell equivalent to unix `which` command?

Does powershell have an equivalent to the which command found in most (if not all) unix shells? There are a number of times I'd like to know the location of something I'm running from the command ...