brew ls
To find the package of the file, please view the file as follows:
ls -l /usr/local/bin/ whatever
If it is installed by Homebrew, it will be a symbolic link in /usr/local/Cellar/something, so you can tell you what package it is.
In Homebrew, how to identify the package/formula of a given file or a list of all files of all packages?
View all files in the package:
brew ls
To find the package of the file, please view the file as follows:
ls -l /usr/local/bin/whatever
If it is by Homebrew Installed, it will be a symbolic link in /usr/local/Cellar/something, so you can tell you what package it is.