mirror of
https://github.com/jbranchaud/til
synced 2026-01-05 16:18:01 +00:00
Add Where Are The Binaries as a zsh til.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
21
zsh/where-are-the-binaries.md
Normal file
21
zsh/where-are-the-binaries.md
Normal file
@@ -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
|
||||
```
|
||||
Reference in New Issue
Block a user