diff --git a/README.md b/README.md index f6fe6e4..1ba99a0 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ smart people at [Hashrocket](http://hashrocket.com/). - [Clear The Screen](zsh/clear-the-screen.md) - [Search History](zsh/search-history.md) +- [Where Are The Binaries?](zsh/where-are-the-binaries.md) ## About diff --git a/zsh/where-are-the-binaries.md b/zsh/where-are-the-binaries.md new file mode 100644 index 0000000..7214eb6 --- /dev/null +++ b/zsh/where-are-the-binaries.md @@ -0,0 +1,21 @@ +# Where Are The Binaries? + +When I want to know where an executable is, I use `which` like so: + +``` +$ which rails +/Users/jbranchaud/.gem/ruby/2.1.4/bin/rails +``` + +That is the rails binary on my path that will be used if I enter a rails command. + +However, with something like rails, there may be multiple versions on your +path. If you want to know where all of them are, you can use `where`, like +so: + +``` +$ where rails +/Users/jbranchaud/.gem/ruby/2.1.4/bin/rails +/Users/jbranchaud/.rubies/2.1.4/bin/rails +/usr/bin/rails +```