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 2014 Edition: Covering 13.10 and 14.04,Ninth 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.