The which Command

Another useful command is the which command. The which command can help you find files that are specified in your PATH environment variable. This was covered earlier in the book and will also be covered in Lesson 16, “Modifying Your Environment.” This means that unless your data is specified in a location (such as a directory) within that PATH statement, you will not find it with use of the which command.

The which command is not useful in this scenario, but that does not mean that it can't be helpful. You may need to edit a file that you absolutely know is in your PATH statement and use this command to recall it quickly.

Get SAMS Teach Yourself Unix in 10 Minutes 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.