Posts Tagged ‘whereis’

Using whereis on Mac OS X Lion

Saturday, January 5th, 2013 | Life, Tech

Linux has a great tool called whereis that allows you to find the location of an executable. For example, if you want to know what PHP binary you are using, you could use the following command.

$ whereis php
/usr/local/php

However, if you run this on Mac it will often return you a black result, even though you know the command works!

$ whereis convert

The solution is to use which instead, which does the the same thing, but actually returns results.

$ which convert
/opt/local/bin/convert

Great for finding those extra mysterious programmes.