Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

bash

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.

like image 250
rettops Avatar asked Feb 03 '11 22:02

rettops


1 Answers

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)

like image 148
fudge Avatar answered Sep 19 '22 21:09

fudge