Using whereis on Mac OS X Lion

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.

Timeline

Newsletter

Don't have time to check my blog? Get a weekly email with all the new posts. This is my personal blog, so obviously it is 100% spam free.

Metadata

Tags: , , ,

This entry was posted on Saturday, January 5th, 2013 at 2:23 pm and is filed under Life, Tech. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.