Tuesday, May 7, 2024
104
rated 0 times [  104] [ 0]  / answers: 1 / hits: 119558  / 2 Years ago, sat, may 7, 2022, 9:57:51

Possible Duplicate:

Location of file folders of installed programs






For example the following are the same



# /usr/bin/php updateDatabase.php

# php updateDatabase.php


But how would I infer the location of the php command to be in /usr/bin?


More From » command-line

 Answers
7

You can use the whereis command to find the location of an executable binary on your system.



Example:



$ whereis ls
ls: /bin/ls /usr/share/man/man1/ls.1.gz


EDIT: From this answer to a similar question, you can also use the which command.



Example:



$ which ls
/bin/ls

[#42076] Sunday, May 8, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
arbaour

Total Points: 346
Total Questions: 115
Total Answers: 105

Location: Oman
Member since Wed, Apr 12, 2023
1 Year ago
;