How do I find location of executable file?

From https://salesforce.stackexchange.com/questions/272125/how-do-i-find-sfdx-cli-default-installation-folder-on-mac:

The simplest way is the type a command

which sfdx 

in Terminal.

/usr/local/bin/sfdx

Another (longer and more complicated) way (which I initially used) is to type command

find / -iname sfdx 

in the Terminal and search in the results for the actual path

/usr/local/lib/sfdx/bin/sfdx