Saturday, May 19, 2012

How To: Locate The Path Of A Command File

The which command shows the path of the executable/command. This does not show the path of commands which are shell-built-in.
Suppose you want to find the directory where the ls command is present, then type

$ which ls


The following screenshot shows "which" in action.Notice that cd is a built in command.


No comments:

Post a Comment