Printing the Location of a Command with which
The purpose of which
is to tell you the exact command that would be executed if you typed it. For example, which mkdir
returns /bin/mkdir
, telling you that running the command mkdir
runs /bin/mkdir
.
Get Ubuntu Unleashed 2013 Edition: Covering 12.10 and 13.04, Eighth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.