Okay so the title is pretty self explanitory, when I type where ...
as a command it returns
-bash: where: command not found
my current bash profile includes :
export PATH="/usr/local/lib:$PATH"
export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/lib/node_modules/bin:$PATH"
I googled it for a while and found that most people just need /usr/bin
and /usr/sbin
which I have both of.
Any ideas?
To access the Unix command prompt in Mac OS X, open the Terminal application. It is located by default inside the Utilities folder, which in turn is inside the Applications folder.
Magnetite is sometimes found in large quantities in beach sand. Such black sands (mineral sands or iron sands) are found in various places, such as Lung Kwu Tan of Hong Kong; California, United States; and the west coast of the North Island of New Zealand.
When you're trying to run a command (with or without sudo ) and get an error message that reads "Command not found," this means the script or file you're trying to execute doesn't exist in the location specified by your PATH variable.
"where" is a shell builtin for csh. Is that what you're really looking for?
"which" and "whereis" are under /usr/bin, and tell you where to find a given command.
As Stuart says, where
is a tcsh builtin command. It's an extended version of the which
command; which
tells you what a command name resolves to, and where
shows a list of all the places (including aliases, builtins, and executables in $PATH
) where a command might be found.
The bash equivalent is type -a
.
If you like, you can add this function definition to your .bashrc
or .bash_profile
:
where() { type -a "$@" ; }
The output isn't in exactly the same format, but it gives you the same information.
(Or you might consider just re-training yourself to use type -a
rather than where
.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With