Use the "contents" action. For example you want to find the location of the "argon2" port.
- Get the port's info using "port installed":
$port installed
The following ports are currently installed:`
argon2 @20190702_1 (active)
bzip2 @1.0.8_0 (active)
gettext @0.19.8.1_2 (active)
gsed @4.8_0 (active)
icu @67.1_4 (active)
libedit @20210216-3.1_0 (active)
libiconv @1.16_1 (active)
libxml2 @2.9.10_1 (active)
mhash @0.9.9.9_1 (active)
ncurses @6.2_1 (active)
pcre2 @10.36_0 (active)
php73 @7.3.27_0+libedit (active)
php73-phalcon3 @3.4.5_0 (active)
php_select @1.0_0 (active)
xz @5.2.5_0 (active)
zlib @1.2.11_0 (active)
Get the port's name and version/variants from the results. In this case "argon2 @20190702_1".
Then run the "content" action.
$port contents argon2 @20190702_1
Port argon2 contains:
/opt/local/bin/argon2
/opt/local/include/argon2.h
/opt/local/lib/libargon2.1.dylib
/opt/local/lib/libargon2.a
/opt/local/lib/libargon2.dylib
/opt/local/lib/pkgconfig/libargon2.pc
/opt/local/share/man/man1/argon2.1.gz
The result shows the locations for the port's related files. In this case the "argon2" file located at "/opt/local/bin/argon2".
Hope this helps.