-7

what command? and why is so important? In UNIX? I have heilo and need to correct command.

  • 1
    A simple search on your favorite search engine, will yield a bucketful of useful answers. To form an opinion, look at $ man find, $ man whereis, $ man locate and post the results of your trials. Besides what Unix flavor do you use ? [Disclaimer: I am not certain that all three manual pages are available on Unix.] – Cbhihe Apr 21 '22 at 15:46

1 Answers1

3

If you need the location of an executable in your PATH, you can use the which command. For example, if I need to know where the Python executable is being called from, I can do this:

$ which python
/usr/bin/python

If your executable isn't in your PATH, you can use there whereis command to locate extra information that you may be looking for. This gives me the binary, library, and source code:

$ whereis python
python: /usr/bin/python3.9 /usr/bin/python /usr/lib/python3.9 /etc/python3.9 /usr/local/lib/python3.9
  • It might be useful for you to add a cautionary note about the present of shims in the PATH variable, in case Python virtual environments are available on a given host ... This is becoming very common nowadays. – Cbhihe Apr 21 '22 at 16:37