TIL: type Is Better Than which

The type cli command is better than which or whereis to find where scripts live

I was looking for a script that I had added to my OS X years ago and rarely used, and the usual which and whereis (even with the helpful -a option) where of no help. Then thanks to StackOverflow I discovered the type command, which is much more useful. This is how I found out the missing command was in fact a bash alias.

❯ type -a pwd
pwd is a shell builtin
pwd is /bin/pwd
pwd is aliased to `git status'

Got thoughts on this post? Join the conversation on Mastodon!