rettops
rettops

Reputation: 611

What is the bash equivalent of the csh 'where' builtin?

I'm a long-time csh user trying (painfully) to convert to bash. My apologies if this is a newbie type question, and I've tried to search the web but google isn't very helpful when the thing you're searching for also happens to be a common word.

What is the bash equivalent of the csh 'where' builtin?

"where: Reports all known instances of 'command', including aliases, builtins and executables in path."

I don't care that much about aliases and builtins. I'm most interested in finding an executable that isn't reported by 'which' because there is another version of the executable earlier in the path.

Upvotes: 13

Views: 8331

Answers (2)

fudge
fudge

Reputation: 131

The whereis command is part of the util-linux-ng package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.

(shamelessly stolen from its man page)

Upvotes: 2

Mikel
Mikel

Reputation: 25626

type -a <program> is the best way in bash.

Upvotes: 17

Related Questions